Photoinduced Formation of Defects and Nitrogen Stabilization of Color Centers in N-Doped Titanium Dioxide