[source-highlight script] Fix bug in HTML-escaping
[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
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