Measurement of stress in nickel oxide layers by diffraction of synchrotron radiation