Hydrogen-assisted phase transition in a trihydride MgNi2H3 synthesized at high H2 pressures: Thermodynamics, crystallographic and electronic structures