The Structural Foundations of Quantum Gravity