Use new style string formatting in cosmology instances

* Change __repr__ to use "{:}".format rather than % formatting.
* Homogenize __repr__s across classes.
* Add unit tests of __repr__ -- I'm not sure if this is a good idea or not.  They pass locally, but any changes
   to the way, say, Quantity formatting works later may be irritating to have to fix here as well in the unit tests.
* Closes #1701