Create TOC for syntax reference
Refraining from applying this to the introduction for now, although I think we'll want to.
This overall approach is a bit clunky - yet another checked-in piece of autogenerated stuff. I'm making "TOC is out of date" a warning.
CC @nickm, although I'm going to merge this as-is.