Operational Strategy for Metal Bioleaching Based on pH Measurements