Neutrino dispersion in magnetized media and spin oscillations in the early Universe