Improve mouse selection peformance by throttling shadow cursor redrawing

Drawing the cursor on every mouse move event badly impacts the responsiveness
of the application, because the move events buffer in the browser until
every single event is processed. By setting these on a background timer,
the cursor is updated asap, but is able to aggregate multiple move events
received in this time period.
Merge pull request #167 from peitschie/delay-cursor-draw

Improve mouse selection peformance by throttling shadow cursor redrawing
Replace references to non-standard Range.comparePoint

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

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.
Detect IE10's buggy range client rects for an empty node

IE reports 0 client rects for an empty element, even if the
element has pre-specified fixed dimensions.

As part of this, a more advanced quirk detection system has been put in
place to make these easier to track.