Electrodialytic separation of phosphorus and heavy metals from