Synthesis and properties of hydroxymethylphosphonic and bishydroxymethylphosphinic acids