Towards a precision calculation of $N_{\rm eff}$ in the Standard Model
  II: Neutrino decoupling in the presence of flavour oscillations and
  finite-temperature QED
  We present in this work a new calculation of the standard-model benchmark
value for the effective number of neutrinos, $N_{\rm eff}^{\rm SM}$, that
quantifies the cosmological neutrino-to-photon energy densities. The
calculation takes into account neutrino flavour oscillations,
finite-temperature effects in the quantum electrodynamics plasma to ${\cal
O}(e^3)$, where $e$ is the elementary electric charge, and a full evaluation of
the neutrino--neutrino collision integral. We provide furthermore a detailed
assessment of the uncertainties in the benchmark $N_{\rm eff}^{\rm SM}$ value,
through testing the value's dependence on (i)~optional approximate modelling of
the weak collision integrals, (ii)~measurement errors in the physical
parameters of the weak sector, and (iii)~numerical convergence, particularly in
relation to momentum discretisation. Our new, recommended standard-model
benchmark is $N_{\rm eff}^{\rm SM} = 3.0440 \pm 0.0002$, where the nominal
uncertainty is attributed predominantly to errors incurred in the numerical
solution procedure ($|\delta N_{\rm eff}| \sim10^{-4}$), augmented by
measurement errors in the solar mixing angle $\sin^2\theta_{12}$ ($|\delta
N_{\rm eff}| \sim10^{-4}$).
