Optical microresonators as single-particle absorption spectrometers