Don't synchronize browser & WebODF selections unnecessarily

The window selection only needs to be synchronized with WebODF on a
mouse down operation. In all other cases, the selection doesn't need to
be maintained. Removing the selection most of the time significantly
helps performance as there is heavy costs to modifying part of a DOM
tree that is selected.

In order to allow cut/copy to continue to function, an event trap was
necessary that "holds" the selection after mouse-up. This is set as
content editable to allow the cut/copy events to be fired in Firefox and
Safari.
Reset the browser selection on drag end

A drag end will consume the corresponding mouse up operation, meaning
the window selection is not cleared. Cope with this by listening for
the drag event and clearing the selection.
Merge pull request #232 from peitschie/event-trap-v2

Don't synchronize browser & WebODF selections unnecessarily
Moved Formatting.applyStyle into consuming operation

Apply style logic is only consumed in one location. Extra wrapping
functions added in StyleHelper and Formatting are unnecessary, and
should not have been called from outside an operation. Pushing this
logic into the operation prevents accidental misuse.
Add an apply direct formatting benchmark action

Additionally, the benchmark will now take configuration options via the
query parameters rather than after the hash.
Use cursor to dom range conversion functions on OdtDocument
Invert type dependency between Formatting and TextStyleApplicator

A text style applicator is a class that modifies the styles tree via
a formatting object.
Merge pull request #236 from peitschie/tsa-move

Move Formatting.applyStyle into consuming operation
* Add an additional flag moveCursor to OpInsertText,
and obey it to explicitly move the cursor to the
desired resultant position.
When doing this, take care to specify the correct
textnode position for text insertion (i.e. before
or after the cursor).
* Adapt the rest of the code that uses OpInsertText
to pass the correct moveCursor flag (true).
* Remove the 'return null' from the transform of
InsertText vs InsertText.
Adapt tests to specify the moveCursor flag
when using OpInsertText.
New cursor re-arrangement behaviour for OdtDocument.getTextNodeAtStep

The new logic no longer provides special behaviour for the requested member's
cursor. Instead, all inserted data will occur after any cursors occupying
that particular step.
Merge pull request #240 from adityab/insert-ot

Allow collaborative text insertion at same position
Create <office:meta> only on demand (and merge MetadataManager into OdfContainer)
Merge pull request #242 from kossebau/createMetaOnlyOnDemand

Create <office:meta> only on demand (and merge MetadataManager into OdfContainer)
Add functions isAnnotation and isAnnotationWrapper
to OdfUtils.

Add a function isInlineRoot to OdfUtils, which
indicates whether an element constitutes a 'root'
as respected by the RootFilter. In gui-less mode,
<office:annotation> is such a root, and in gui
mode, where we wrap annotations, we should also
treat the div with class "annotationWrapper" as
such a root.

Inline Roots are to be treated just like character
elements or frames with 'as-char', therefore add
a check for those to isCharacterElement as well,
alongside the one for isCharacterFrame.
* Use the new isInlineRoot method in OdfUtils, to
determine walkability around annotations via
the TextPositionFilter.

- In checkLeftRight, now that positions to the left
and right of an annotation are walkable by default,
block the position to the right of an annotation
if there is a grouping element (span, annotation
highlight, etc) to the right.

- Thus, now you can step to both the left and right
of a rangeless annotaiton.
If the annotaiton has a highlighted range, the cursor
won't be able to step between the <office:annotation>
element and it's annotationHighlight, so there
can be no strange text insertion there, and no
rewrapping is required over the newly inserted text
as it goes straight into the highlighted span
like everywhere else.

* Add tests to OdtDocumentTests for cursor positions
around annotations.

* Add tests to operationtests.xml (mostly bumping up
the positions of SplitParagraph operations after
adding annotations, now that 1 new position is exposed.
Split OdfUtils.isCharacterElement into
OdfUtils.isCharacterElement which only
checks for character elements (space, tab,
line-break) and OdfUtils.isAnchoredAsCharacterElement,
which reflects the fact that it checks for elements
which are 'as-char' (the way frames can be anchored),
in that they have the same kind of surrounding
positions' walkability as any character element
like spaces or tabs.

* Fix wrong documentation for this method.

* Update tests to reflect this, and also test
annotations and annotation wrappers.

* Update the other places in the codebase
to use the correct one of the two methods.
Rename from isCharacterElement to
isSpaceElement in OdtDocument, while
checking elements for downgrading spaces.
Merge pull request #243 from adityab/filter-annotations

Make positioning around annotations more usable/realistic
* Add moveCursor flag to OpSplitParagraph.
* Adapt places where OpSplitParagraph is initialized
to also add the moveCursor flag.
* Let SplitParagraph vs SplitParagraph execute normally
at the same position.