Exact Quantum Theory for N Rydberg Atoms in a Cavity