Merge pull request #159 from peitschie/virtual-selection-fixes

Virtual selection fixes
Replace references to non-standard Range.comparePoint

Range.comparePoint is unsupported by IE10
Don't use text nodes as tree-walker roots

IE10 will throw an exception if the root passed
into a tree walker is a text node.
Ensure all arguments are passed to the tree walker (IE compatibility)
Restore focus to canvas without clearing selection in IE10

This also requires the next focus event to be suppressed after modifying
the selection
Bind window-related events on direct element as well (IE compatibility)

These events will not bubble up to the window if consumed by the canvas
element.
Modify unscaled range detection bug to work with Internet Explorer

IE reports a range height of 0 if there is no text within the test
element.
Detect IE's buggy range BCR
Virtual selection demo

Implementation notes
* Rounds selection to the closest offset
* Resets the selection on mouse down
* Changes the mouse cursor on mouse down to indicate text selection is occurring
* Only consider text nodes as valid for highlighting
* Copes with vertical and horizontal scrolling
* Utilised advanced Chrome & Firefox point-to-caret translation
* WORKS WITH IE10

Test-related Features
* Region to test browser-based selection vs. virtual selection
Gloriously nasty implementation of caretPositionFromPoint for IE
Hacks to make virtual selection work (IE compatibility)