Working on docs.

A lot of tweaking of the sphinx-rst doc infrastructure.