Electrochemical degradation and extraction capability of magnesium wastes in sewage treatment