Radiative shocks in galaxy formation. I: Cooling of a primordial plasma with no sources of heating