X-ray absorption spectroscopy studies of nickel oxide thin film electrodes for supercapacitors