Suppress error in IE8/9 when initializing detached
Fix rmClass

Add tests
[vim] Visual mode rewrite

I'm rewriting the way that visual mode is written to:
1. Fix some tricky bugs, like https://github.com/codemirror/CodeMirror/issues/2913, and a couple I uncovered while doing this. (Unit tests updated)
2. Significantly simplify blockwise visual mode

The core of the changes here is that I'm creating a vim selection model. The selection model consists of

```
vim.sel.head
vim.sel.anchor
vim.visualMode
vim.visualLine
vim.visualBlock
```

I'm creating a 2-way binding between the vim and codemirror selection models. All motions now rely only on the vim selection model. Operators and actions still rely on the codemirror selection model, since they operate directly on the text.

Sorry for the gigantic change but I couldn't make it any smaller and still pass all the tests... I'm planning to delete `getSelectedAreaRange`, `getLastSelectedAreaRange`, and `selectBlock` in future changes as they are obsolete now that vim keeps its own selection model.

An added bonus here is that visual line mode now has a cursor that can be moved.
[sql mode] Remove outdated comment
[stex mode] Sanitize comment parsing
[stex mode] Set to two-space indentation
[stex mode] Reset tokenizer after blank line

This prevents a stray $ from setting the whole rest of
the document to math mode.

Closes #2928
[loadmode addon] Work with requirejs

See http://discuss.codemirror.net/t/loadmode-js
[sparql mode] Update with more details from 1.1

- more style classes: operator, builtin, meta, brackets
- literal metas (@ and ^^)
- many more operators
- mime type and extension from spec
[sparql mode] Property paths
Mark version 4.8.0
Bump version number post-4.8
[search addon] Do a string search if a bad regexp is entered
[search addon] Simplify control flow
Pass a context (the editor) to keymaps with a call method

Issue #2915
[shell mode] Add folding helper reference
[dialog addon] Ensure that enter presses can be preventDefault-ed

When closeOnEnter is disabled the enter event never gets default
prevented this causes issues for IE9/10, this way implementors can
optionally preventDefault if they want
Make sure scrollPosIntoView always returns a coords object
Never render tokens larger than 50k chararcters

Webkit can't deal with them.

Issue #2945