Synthesis, characterization and electronic structure of nitrogen-doped TiO2 nanopowder