Materials Design and Electrochemical Methods for Water-Energy Nexus: From Water Purification to Resource Mining