Preparation of phosphorus-containing epoxy emulsion and flame retardancy of its thermoset