Thermodynamics and reactivity for the interconversion of active sites on a magnesium surface in the Grignard reaction