Effect of octahedral cation on electronic, magnetic and optic properties of CoX2O4 (X = Cr, Mn and Fe) spinel compound