Hydrogen from wastewater by photocatalytic and photoelectrochemical treatment