Cation distribution and magnetic properties of CoxMg1−xFe2O4 nanoparticles