Tuning the hydrophilic, hydrophobic, and ion exchange properties of mesoporous TiO2.