Implement the charm store logging API.

This will allow storing/retrieving ingestion logs.
To activate the functionality, a client branch is also
required.
Alternatively, if we're prepared to trust the no-one is actually going to fabricate an invalid json.RawMessage (which I think isn't unreasonable), we could just use *data below.