Electron properties of TiO2 and TiO2:Nb films studied by combined optical and x-ray photoemission spectroscopies