An ab initio study of the mechanism of the Atherton-Todd reaction between dimethyl phosphonate and chloro- and fluoro-substituted methanes