A compact photon-correlation spectrometer for research and education