Relaxation dynamics of ruthenium complexes in solution, PMMA and TiO2 films: The roles of self quenching and interfacial electron transfer