Electronic structure calculations and dynamics of the chemisorption of methane on a Ni(111) surface