Fix karma.conf.js updating on Windows

Karma.conf.js may contain \r's when checked out on Windows. Cope with
these when updating the karma configuration file content.
Merge pull request #641 from peitschie/win-karma

Fix karma.conf.js updating on Windows
Add SessionBackend abstraction

hides away any assumptions about server class structures from the Editor class
Remove option to configure the member id in local edit mode
Merge pull request #624 from kossebau/sessionbackend

Reduce assumptions about backend in the editor
Ensure a caret doesn't receive any new events after destroy is invoked

Deleting the caret before calling ensures there is no way for any external
sources to get access to the soon-to-be destroyed caret.

As part of tracking this down, scheduled tasks will now throw an error
if an attempt is made to trigger the task (either delayed or immediate)
after the particular instance has been destroyed.

This then showed that functions bound to browser events swallow errors
quietly, so additional logging was added to the EventManager delegation
code to ensure errors generated when processing an event are logged.
Merge pull request #620 from peitschie/caret-destroy-fixup

Ensure a caret doesn't receive any new events after destroy is invoked
Wait with sending statereadychange until all items from the load queue have been handled.
Merge pull request #642 from vandenoever/canvasdone

Wait with sending statereadychange until all items from the load queue h...
Pass on expected sessionConstraints parameter to SessionView in viewer
plugin.
Merge pull request #643 from adityab/viewer-constraintfix

Fix viewer crash when initializing SessionView
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