Add lots of documentation in RST

The Sphinx config is not checked in yet, until I figure out which files
need to be committed.