Leaching of Metals from e-Waste: From Its Thermodynamic Analysis and Design to Its Implementation and Optimization