First-Principle Calculations of the Adsorption, Dissociation and Diffusion of Hydrogen on the Mg(0001) Surface