Adaptive timing of "check" and continuous "complete" handlers

Since the check phase (e.g. linting) of very large files can take a
while, Zed now times how long the check phase takes and adapts how often
"check" is invoked accordingly on a file-by-file basis.

For instance, before opening Zed's ace.js file (17k lines) would use up
100% CPU when editing it a lot of the time (because jshint takes a while
to run), as a result completion stopped working (because the sandbox was
occupied running jshint). This is now much better as jshint will be run
far less often.