[runmode addon] Fixed resolveMode in runmode.node

This fix has been modelled after the getMode function in runmode.node in
v3.20.0
Documentation pass, part 1 (up to updateDisplay)
Get rid of the viewChanged argument to updateDisplay

Use a more accurate way to determine whether a redraw is needed.
Documentation pass, part 2 (up to startOperation)
[source-highlight script] Fix bug in HTML-escaping
[bidi algorithm] Properly categorize zero-width non-joiners

Issue #2218
Documentation pass, part 3 (up to replaceRange)
Fix calls to updateDisplay passing bogus arguments

Broken by 32c2630
Closes #2222
[rst mode] Fix innerMode and copyState

Issue #2221
[rst mode] Swap mode definitions

So that the default mode when this is loaded first is actually a
working mode.

Also: indent the file to correspond to the rest of the codebase.

Closes #2223
[rst mode] Fix demo

Issue #2223
[vim] Make text objects work with },), and ].

Previously commands like da<object> only worked with the opening side of the
pair, so you could do da{ but not da}.

I also removed some duplication of calls to selectCompanionObject (at the cost
of switching from map lookup to an if-else chain).
[real-world uses] Add i-MOS
[rst mode] Fix creating of start states

So that it doesn't error when inner modes are missing.

Issue #2224
[anyword-hint addon] Fix variable clash

Closes #2225
Merge branch 'master' into v4

Conflicts:
	mode/rst/rst.js
[runmode.node addon] Integrate with node's require mechanism

Mode dependencies are now loaded in a saner way.
[vim keymap] Add missing copyCursor call
Ensure that indentLine resets a line's stateAfter

So that calling it on a block in sequence won't get stuck with an
outdated state after lines whose indentation doesn't change.

Closes #2227
[vim] Add multi-line support to testEdit()