Biomimetic Mg-substituted hydroxyapatite: from synthesis to in vivo behaviour