Adsorption and Substitution of Metal Ions on Hydroxyapatite as a Function of Crystal Facet and Electrolyte pH