Implemented nested table of contents generation via #header().

It is now possible to use calls to header within nested ordered blocks
to generate a hierarchical table of contents (both NCX and XHTML).