Effect of cation doping on the structure of hydroxyapatite and the mechanism of defluoridation