Refactored Markdown processing into separate classes in a new package.

The Markdown text is now captured in a MarkdownDocument class. The text
is parsed on construction, once, and then reused in separate calls by
applying a different visitor.

Extracting the title from the text is now also better. It doesn't use
an ugly, limited regular expression anymore. Instead it pulls out the
title using a visitor on the parsed text.