Quantum theory of the two-photon laser