Ab initio theory of quantum fluctuations and relaxation oscillations in multimode lasers