Carrier-selective p- and n-contacts for efficient and stable photocatalytic water reduction