Optical space and time coherence near surfaces