A high-resolution core-level study of Ni-catalyzed absorption and desorption of hydrogen in Mg-films