Events now emitted through per-editor mediator

Rationalised mediatedevents into a mixin. Changed some
names to be more friendlier.

Ported to the new Browserify architecture by @dwb