Document config options

This is a first stab at autogenerating documentation for our config options. The docs at present say a lot about how the config system works, but not much about what you can actually configure.

This PR is stacked upon #4477, to avoid a merge conflict.