Issue 110

This resolves issue 110. It also:

Fixes formatting a few places.
Adds Isjson to read events in client API
honours isjson flag (via data/metadata content types) over protobuf interface
introduces a test for json passing

It does not change any wire protocols etc and is not a breaking change.