Add failing test showing crash with apply styles op
Use ranges when applying a style to better handle DOM changes

When first created, the text style applicator used to move nodes around
within the first while loop, often modifying the limiting range in ways
that were not expected.

In 5a86bdd, this behaviour was re-written to gather all the relevant
nodes and migrate them once all siblings in the container were checked.
With this change, it is now best to use the range once again, as this
avoids additional problems (see the modified test) with new children
being added within the range if new styling containers are inserted.
Merge pull request #444 from peitschie/apply-style-crash

Use ranges when applying a style to better handle DOM changes
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
Refactored creation of style tree

Moved the creation of the style tree out of Styles2CSS. This is the first
step in refactoring out and fixing some duplicate list handling code in
OdfCanvas.js.
Use Object.keys for iteration