Structure and composition of metal-substituted calcium-deficient hydroxyapatite