The interaction of N with Ti and the oxidation of TiN studied by soft X-ray absorption spectroscopy