Stability of calcium and magnesium carbonates at Earth's lower mantle thermodynamic conditions