X-ray photoelectron spectroscopy and grazing incidence X-ray reflectivity study of silicon nitride thin films