On the breaking of a plasma wave in a thermal plasma. I. The structure of the density singularity