Improve performance for MarkdownEditorView.

MarkdownEditorView was listening to some frequently-emitted signals on
CodeMirror, performing calculations, and then emitting its own signals.
This ended up taking enough time that it led to a slowdown of text
input, making the input feel sluggish.

We now throttle the events. Viewport changes are limited to one every
250ms, and change events are limited to one every 500ms.

The result is that the widget went from sometimes sluggish performance
to near-native (though this will likely still depend on how overloaded
the browser is and what the page is doing).

Reviewed at https://reviews.reviewboard.org/r/6427/