First-principles investigation of Mg substitution for Ga on martensitic transformation, magnetism and electronic structures in Ni2MnGa