Never use a text node for a tree-walker root

IE10 will throw an exception if the root passed
into a tree walker is a text node.
Centralising window selection logic

* Restore focus to canvas without clearing selection in IE10
* Suppress focus event behaviour when one is expected to to modifying selection
Bind window-related events on direct element as well (IE compatibility)

These events will not off the window if grabbed by the direct canvas
element.