PEP8 fixes in astropy/cosmology

Goes towards fixing #1133.