Added sections/chapters to the graph generation

And made it more robust regarding inconsistencies between stacks-project/ and database.
Merge branch 'master' of github.com:stacks/stacks-tools