Preparation and characterization of CoFe2O4 powders and films via the sol–gel method