Re-implement the charm-event legacy API endpoint.

Only support what strictly required by "juju publish".
This is based on Jay's work.
Proper error checking in the charm-event endpoint.
Add a missing test for the legacy charm-event endpoint.
Improve docstrings and comments in the charm-event legacy endpoint.
Abstract out a function to retrieve the entity Bazaar digest.
Legacy charm-event endpoint: handle digest not found race condition.
Merge pull request #244 from frankban/add-legacy-charm-event

Re-implement the charm-event legacy API endpoint.

Only support what strictly required by "juju publish".
This is based on Jay's work.