Statistics for Herschel PEP/HerMES: the redshift evolution of dust attenuation and of the total (UV+IR) star formation rate density