Effects of N adsorption on the structural and electronic properties of SrTiO3(0 0 1) surface