Add paragraph alignment to the benchmark

This is disabled by default because it is very very slow (8s @ 10pages)
Batch up calls that refresh the canvas CSS, size or annotations

These calls are UI render-related operations, and don't need to be done
immediately after every operation. Batching these up and doing them all
once after all ops are processed greatly improves the performance of
paragraph alignment updates with multiple paragraphs selected.
Re-use new styles when applying direct paragraph styling

We only create a new paragraph style once per unique paragraph style
name. This vastly reduces the number of new styles created when
formatting a number of paragraphs that all share the same existing
paragraph style.
Save and restore focus once per batch of operations

Focus saving and restoring is expensive on most browsers, so major gains
in performance are realised by not doing this for every operation. A new
pair of signals implemented by operation routers denotes when a batch of
operations is about to processed, and when the router has completed this
batch.

Note, there is no implied promises about how many operations are executed
within a batch. This is left as a choice to the router implementations.
Merge pull request #343 from peitschie/align-perf

Improve performance of direct paragraph styling
Remove circular dependency between OdtDocument and OdtCursor.
OdtCursor does not depend on OdtDocument any more. In fact, it is not specific
to ODF any more so at some point it could be renamed.
Make ShadowCursor independent from OdtDocument.
Update EditorSession to the new document API.
Rename ops.Document.getCursors to ops.Document.getMemberIds.
Merge pull request #362 from vandenoever/odtcursor

Remove circular dependency between OdtDocument and OdtCursor.
Make gui.Caret, gui.UndoManager and ops.Operation 100% typed.
Make gui.TrivialUndoManager and gui.UndoStateRules 100% typed.
Merge pull request #365 from vandenoever/typing

Add more typing information to some classes
Adapt PullboxOperationRouter to batch processing signals

Missing from 26a9252edbe9295fc1c2f027096d6d2f22ea6f52
Merge pull request #366 from kossebau/fixBatchSignalsWithPullbox

Adapt PullboxOperationRouter to batch processing signals
Create direct linking between matching annotation and annotation-end elements
Fix incorrect (by pattern) check of compareDocumentPosition result