Ultrasound-Assisted Synthesis of Nonmetal-Doped Titanium Dioxide Photocatalysts for Simultaneous H2 Production and Chemical Oxygen Demand Removal from Industrial Wastewater