Transition in the nanoporous structure of iron oxides during the oxidation of iron nanoparticles and nanowires