Polymeric precursor route for the preparation of calcium phosphate compounds