Fundamental properties and phase stability of B1 and B2 phases of MgO over a wide range of pressures and temperatures: A first-principles study