Theoretical investigation of the adsorption and diffusion of hydrogen on the surface and in the bulk of the intermetallic compound Mg2Ni