Calculate caret display from closest STEP rather than closest sibling

The caret display position is tied to the ClientRect of the associated
cursor's text content, which is usually found to the left of the cursor.

Using a step iterator ensures only steps within the same root as the cursor
are considered, preventing issues such as #260 & #559.
Merge pull request #595 from peitschie/caret-rect-calcs

Calculate caret display from closest STEP rather than closest sibling
Update webodf/tools/karma.conf.js: add new class file lib/gui/GuiStepUtils.js
Add signalling for metadata changes to OdtDocument
and the Editor.
Add methods setMetadata and getMetadata to Editor.
Merge pull request #572 from adityab/signal-metadata

Add the ability to modify document title collaboratively
Don't assume caret overlay is a child of the current OdfCanvas sizer

Any calls to OdfCanvas.setOdfContainer will reset all the odf canvas
children, and may create a new sizer. By using the parentNode of the
overlay directly, the Caret can be safely cleaned up if this occurs.
Remove any active members before replacing the document element on undo

The members are effectively removed and then re-added during an undo.
Replacing the document element actually resets the OdfCanvas and related
sizers, so the members should be removed before this reset occurs.
Ensure focus is returned to the event trap after an undo

This behaviour regressed in c0332ed due to the caret overlay element
being moved inside the overlay itself. As a result, the event trap was
automatically being re-added after an undo, causing the SessionController
to incorrectly skip returning focus back to the trap upon completion.
Merge pull request #598 from peitschie/caret-overlay-destroy

Fix regression during undo
Meet Bella. She will destroy your documents.

* Supports multiple instances in the same doc
* Able to exercise entire selection controller
* Can say meow (and other text manipulation actions)
Using a real SessionController causes problems with double-events
Extend Bella's functionality

* Knows  about undo & redo
* Will also destroy your document formatting too!
* Can cut, copy & paste
* Bella is a tidy cat and likes valid documents
* Bella can be hooked up to use an existing cursor
* Custom actions to be loaded externally
* Has AMD integration
Add workaround for crashing TrivialUndoManager bug

TODO - raise an issue about this!
Add checks to ensure the cursor is in a valid step

Issue highlighted in review of PR #451.
Add a seeded random number generator to allow reproduction of crashes

Original source: https://github.com/davidbau/seedrandom
Compilation fixups
Add some really simple reporting stats
Make seeding random by default
Allow seed to be specified via URL