Phase separation of Mg2Ni by hydriding–dehydriding cycling