Isolate the mutable state

The ``MarkdownRenderer`` implementations were grim: they kept state between invocations of the ``render`` method. This fixes the problem.