Refined TOC generation handling and support for TOC generation in chunk-wrapper mode

This pull request refines TOC generation such that a full-book TOC will be generated for any `<nav data-type="toc">` element, provided the corresponding autogenerate-toc and toc-placeholder-overwrite-contents are set accordingly.

Also adds support for TOC generation in process-chunk-wrapper mode for chunk.xsl.