The thermal decomposition of Mg-containing carbonate apatites