Re-implement paragraph & document selection using step iterators

Changes in adjustSelectionByNode logic fixes extend-by-paragraph
problem (issue #335).
Use named constants for movement direction rather than magic numbers
Crop range selection to the anchor root

Fix an unhandled case if the anchor and focus points of a range were in
two separate roots. The select range logic will now clip the range to
the closest valid edge within the anchor's root.
Use the start node rather than cursor for word boundary expansion

The SelectionController interfaces allow word-expansion to occur on
arbitrary ranges that may not be tied directly to the cursor (e.g., when
used via the selectRange interface). This means the correct root to use
in all circumstances is the starting node & offset.
Merge pull request #450 from peitschie/paragraph-sel-fixes

Various fixes to paragraph and range selection
Fix DomUtils.getNodesInRange when started just before a rejected node

Stop getNodesInRange from returning children of rejected parents
when supplied range starts just before a rejected node.
Fix DomUtils.getNodesInRange when started inside a rejected subtree

When the supplied range is started within a rejected node, this
function will now start iteration just after the highest rejected
node. This brings the getNodeInRange filter behaviour inline with
existing PositionIterator logic.
Merge pull request #454 from peitschie/rejected-text-child

Don't return text content if started just before a rejected node
Allow the event trap to receive focus in read-only mode

A disabled element is not able to become the document's activeElement.
The better way of setting the event trap to non-editable is through
the readOnly flag. This still allows focus to be passed to the trap.

During a mouse down event, the event trap should be disabled however
to ensure it doesn't capture the window selection.
Re-enable the event trap if a context menu is displayed

A contextmenu event is fired instead of a mouseup event, therefore
both these events need to be listened for to ensure the event trap
becomes re-enabled.
Move control of event trap inside the EventManager

Management of the event trap is not related to the IME. Moving the
coordination of the disabled and readOnly flags inside the EventManager
better hides these concepts from external consumers.
Inline EventManager.blur as all uses are now internal
Make compound event signal name less generic
Unsubscribe event delegates when the EventManager is destroyed

To make this feasible, a consistent interface has been added to
compound and normal event delegates. This allows better impl
hiding from the rest of the EventManager class.
Merge pull request #470 from peitschie/focus-restore-fix

Allow the event trap to receive focus in read-only mode
Add additional benchmark documents

The document and node structures differ significantly in these new
documents compared to the existing benchmarks. This will help uncover
new bottlenecks in the system.
Correct IE detection code for containsNode workaround
Avoid more slow calls in StepsTranslator

Add more complex equality & lookup logic that attempts to avoid calls to
unfilteredDomOffset.

TODO
- Move & rename to PositionMemento
- Potentially expose getter on PositionIterator
- Unit tests
Improve performance by moving node filters out of the TextPositionFilter

TODO
- Unit test
- Redesign to fit in the correct area
Put off accessing the walker's current node as long as possible

Fetching the currentNode property on a tree walker is surprisingly slow.
Putting this off as long as possible improves the overall iteration
speed significantly.