Semiconductor electrodes. 31. Photoelectrochemistry and photovoltaic systems with n- and p-type WSe2 in aqueous solution