Fix logic error in onFocus

Issue #2494
Remove debugging code
Prevent select-all hack from confusing readInput when there is a selection

Issue #2496
Another fix around the select-all hack

Issue #2495
Scroll change, rather than cursor, into view on undo/redo
Fall back to nullRect in measureCharInner to work around Safari issue

Issue #2492
[jade mode] Re-write to match the jade lexer
[jade mode] Fix linter errors

Issue #2490
[vim]last search register added