Ultrasmall and phase-pure W2C nanoparticles for efficient electrocatalytic and photoelectrochemical hydrogen evolution