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
Refactored application of list styles

Moved the code that parses ODF lists styles and creates rules for them
into a separate object. This is done as the second step in removing
duplicate/redundant code from OdfCanvas.js around some list style
handling.
Removed duplicated stylesheet error handling
Implement label-width-and-position mode for list layout

Remove the partial handling of list indentation and implement the default
option for list-level-position-and-space-mode.

http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#property-text_list-level-position-and-space-mode