Fixed numbering mismatch between TOC and sections in HTML.

Also made `--number-offset` affect TOC numbering as well
as section numbering, as it should have all along.

Closes #789.