Solvothermal Synthesis of CdS Nanowires for Photocatalytic Hydrogen and Electricity Production