Chemical bias of electrochemical and photoelectrochemical water splitting using a hydrogel separator