Dual-Functional Photocatalytic and Photoelectrocatalytic Systems for Energy- and Resource-Recovering Water Treatment