Improve the output for the Markdown UI.

The Markdown UI's line generator for rendered source didn't handle lists
very well, and had some other less-than-ideal rendering issues. We now
have a more specialized line emitter for rendered Markdown, which has
been moved to markdown_utils.py for use by other code.

On top of that, source was rendered using some non-Markdown lexer.
Pygments, it turns out, doesn't have a Markdown lexer, oddly.
ReStructured Text is really close, but not a complete match, and could
lead to some confusion. So, we're using the plain-text renderer for now.