Semiconductor-electrocatalyst contacts: theory, experiment, and applications to solar water photoelectrolysis