add Sphinx support

The docs needed a bit of refactoring, as Sphinx gets funny with the include directive. There are still a few minor formatting issues around the databases.
The change not shown below is that actually the old index.rst is now 'flow.rst'.