Electromagnetic field fluctuations near a dielectric half-space and appearance of surface divergences in the ideal conductor limit