Bridging the Gap Between Bulk and Nanostructured Photoelectrodes: The Impact of Surface States on the Electrocatalytic and Photoelectrochemical Properties of MoS2