Frequency-resolved photon correlations in cavity optomechanics