Resource recovery and carbon valorization during wastewater treatment using electrochemical and microbial electrochemical methods