Correct and simplify the logic introduced before to handle approot:

 - Only the port is needed to run gitit2
 - The approot defaults to `http://locahost:port` but can be set to an
 arbitrary url (with a different or no port) from the settings file
Table of contents (toc) extends to Subpage, where a subpage is a wikilink of
the from `[mySubpage]()` alone in a paragraph.
- table of contents, categories and content are cached separately.
- the table of contents is cached as a hierarchicalized pandoc (`Element`)
further stripped down to only contain only section and link (`GititToc`)
- the table of content is then converted to HTML by converting the
sections to HTML list and recursively within the links

A patch is needed on pandoc because
- some unexported functions from pandoc are needed to construct the toc:
`defaultWriterState`, `WriterState`, `inlineListToHtml`, `unordList`
- the type of this functions needed to be generalized to use `StateT`
instead of `State`
Added maximum depth for table of contents.
As a side effect, this prevents infinite loop in the computation of the
table of contents when subpages form a cycle.
Added an option in settings file to disable extended toc
add ident and class to subpage link
Display toc of subpage in the content, use the same style as the page toc.
Added an option in settings file to disable the display toc of subpage in the content.
toc: repair link to page sections
preview in edit
updated TODO in README.markdown