Mechanisms of Pathogen Inactivation in Wastewater and Pharmaceutical Applications