Restore feature: Headers get ID attributes.

This was in the old, regexp parser. Bit different now: The header
isn't necessarily plain text, it's a list of arbitrary xexprs. Convert
these to a text "slug" for the ID attribute.
Revive the `toc` function.

It generates an ordered list based on h1, h2, h3 headings.