Primordial Magnetic Fields In Cosmology