Validate server-side events and send them as JSON.

Consider this a first pass at the problem. What I'd really like to do is
create a Schema class that RemoteSchema would inherit. 'Schema' would
wrap the JsonSchema.php we get from robla's extension and encapsulate
the validation logic. Currently roles and responsibilities are all mixed
up, with some validation logic remaining in the Content / ContentHandler
classes.

The other wart is the ambiguity between methods that validate by
returning a boolean and methods that validate by raising exceptions on
invalid input. I'd like things to be centralized, internally consistent,
safe, and ideally consistent with the JavaScript API. If you have ideas,
let me know.

Change-Id: I36e00825d522531625e7e53d75391067d27f1bb6
Merge "Validate server-side events and send them as JSON."