[markdown mode] Fix code block styling after indented line

These changes should fix Issue #2479 and XML rendering in Markdown mode, both of which affected the [official demo](http://codemirror.net/mode/markdown/index.html). Could you please review the changes?