Include more info in the meta/stats endpoint.

The meta/stats endpoint returns aggregated downloads
count for the last day, week and month.
It also includes both the stats for the specific
entity revisions and the stats for all revisions of the
requested entity.
meta/stats: fix typos and add a test for non promulgated charms.
Make the use of prefix more explicit when aggregating download counts.
Improve the id/meta/stats endpoint response structure.
Merge pull request #241 from frankban/improve-meta-stats

Include more info in the meta/stats endpoint.

The meta/stats endpoint returns aggregated downloads
count for the last day, week and month.
It also includes both the stats for the specific
entity revisions and the stats for all revisions of the
requested entity.
Use AGPL license.
Merge pull request #242 from frankban/agpl-license

Use AGPL license.
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.
Refactor charmstore to use new helpers in jujutesting.
Update dependencies.
Fixing mistakes in import grouping.
Merge pull request #245 from frankban/use-testing-json-assertions

Use testing json assertions

Big branch (apologies!) but mostly mechanical.

Also updated dependencies.