Add a heuristic to detect ends of paragraphs inside block elements.

Currently, the Markdown paragraph parser eats the closing tag of a block
element that encloses a paragraph. This patch adds a heuristic which
measures the amount of indentation for the paragraph's first line, and
ends the paragraph when a line is encountered that is outdented from
that initial point.

Fixes #165.