Performance: Move TOC parsing into rendering stage
Merge pull request #2131 from lmorchard/performance-toc-html

Performance: Move TOC parsing into rendering stage