Competition between electron transfer, trapping, and recombination in CdS nanorod-hydrogenase complexes.