Thermodynamics of viscous Matter and Radiation in the Early Universe