Add an 'inverse' cosmology function

Following discussion on the list, here's an example implementation of an inverse function for the cosmology package.

Documentation and a changelog still needs to be added, but I thought I'd open this PR to get feedback on the approach. @aconley and @eteq might want to take a look.