Thermodynamics and electronic structure characteristics of MFe2O4 with different spinel structures: A first-principles study