Development of thin-film nickel hydroxide electrochromic materials using in situ microfocus XAFS and XRD techniques