Structural and magnetic properties of nickel ferrite nanoparticles synthesized via a template-assisted sol–gel method