[vim mode] Fix visual mode downwards movement bug

Previously, if you tried to move further down the document than exist
the cursor would not move down.  This sets selectionEnd.line to be
no greater than the total length of the document.
[rst mode] LaTex/Python inner mode glitches

The were some minor issues w.r.t. where exactly an `stex` or `python`
inner mode starts and where the outer `rst` mode resumes; fixed.
[rst mode] Removed unknown bugs catcher
Prevent onFocus/resetInput from interfering with nested editor
[brace-fold addon] Use getTokenStyleAt instead of getTokenAt when scanning
Use a bigger search range when finding a start-of-parse point in mixed modes
[brace-fold addon] Fix bad use of lastIndexOf
[velocity mode] Update

 * Updated for CodeMirror 3 - added comment clock declarations

 * Corrected handling of macro calls with a body

 * Added extra features for detecting variables within strings and
   methods & properties of objects

 * Corrected the detection of methods and properties of Java objects
(Mostly) handle cursor positioning around multiple bookmarks in same position

Closes #1726
Disable another test on Phantom

(Works in real browsers.)
Re-reset the input right after a focus event

It seems recent versions of Chrome/Blink fire the handler first,
and then clear the selection.

Issue #1730
[xml mode] Fix value-less attributes

Issue #902
Clear measure div after line measurement

To prevent a lot of DOM nodes from sticking around after measuring a
long line, easing the pressure on the GC.
[continuecomment addon] Move to addon/comment (from addon/edit)
"grey" is an accepted named color value (same as "gray")
Python function/class definition highlighting.
erlang mode bug fixes
Configurable delay between selection of a word to highlighting of word.

current delay of 100ms between selection of word to highlighting is almost instantaneous.
Fix linenumbers when undoing multiple changes
Fix bug in handling of Esc key in IE