Prevent update and viewportChange events from being fired too often

Previously, they'd fire multiple times when an update didn't immediately
become stable.
Explicitly set gutter height

This prevents it from being repainted whenever the height of the inner
editor briefly changes during a repaint. (At least, it does on Webkit).

Issue #1514