More selection command fixes and tests

Issue #778
Simplify and organize click handling
Implement ctrl-click multi-selection

Issue #778
Implement alt-drag rectangle-selection

Issue #778
Implement line-per-selection paste

Issue #778
[comment & continuecomment addons] Make multi-selection aware

Issue #778
[matchbrackets addon] Make multi-selection aware

Issue #778
[closebrackets addon] Adjust to multi-selections

And fix example code in demo.

Issue #778
[closetag addon] Adjust to multi-selections

Issue #778
[continuelist addon] Adjust to multi-selections

Issue #778
[markselection and activeline addons] Adjust to multi-selections

Issue #778
Small changes to make remaining addons play nice with multi-selection

Issue #778
[multiselect keymap] Add
[tern addon] Add select-variable-instances functionality
[doc toc script] More accurate active link highlighting
Document multiple selection API

Issue #778
Don't use .next properties in change event objects anymore
Add a v4 upgrade guide
Wrap all modules in AMD and CommonJS-supporting shims
[javascript, xml, haxe modes] Fix strict-mode violations