First-principles investigation of Mg2THy (T=Ni, Co, Fe) complex hydrides