Constraints on Cosmology and Quantum Gravity from Quantum Mechanics and Quantum Field Theory