Synthesis of chiral and racemic functional polymers from glycidol and thioglycidol