Quantum-mechanical Hartree-Fock study of calcite at variable pressure, and comparison with magnesite