Quantum-mechanical simulation of MgAl2O4 under high pressure