The Quantum Memory Matrix: a unified framework for the black hole information paradox