Avalanche of entanglement and correlations at quantum phase transitions