General and complete description of temporal photon correlations in cavity-enhanced spontaneous parametric down-conversion