Shock Electrodialysis for Water Purification and Electrostatic Correlations in Simple Electrolytes and Polyelectrolytes