Table of contents!

Add a table of contents to the header if the toc attribute is set. Unlike AsciiDoc, we are reifying the table of contents into the document. (I really don't see why it's necessary to use JavaScript to create the table of contents).

This pull request is based on the previous.