Two-loop scattering amplitudes from ambitwistor strings: from genus two to the nodal Riemann sphere