Stability of magnesite and its high-pressure form in the lowermost mantle