Quantifying spectral diffusion by the direct measurement of the correlation function for excitons in semiconductor quantum wells