Preparation and characterization of nanocrystalline NiFe2O4 thin films for sensors and supercapacitors