Implemented a cleanup worker for deleting any metrics that are over a
certain age
added comments and copyright
refactored metric doc to make it simpler. made some changes based on
review.
warning log instead of error in the cleanup worker
minor fixes after review
don't return errorresult, just return error
testing factory fixes
turn cleanup metrics into a bulk api call
minor fixes to error handling
added annotate to metric delete
Merge pull request #665 from mattyw/add-metric-workers

Add metric cleanup worker

There are 3 main changes in this pr:

1) Added a cleanup metrics and delete functions to state to allow metrics to be deleted
2) Added an API endpoint for calling the CleanupMetrics function
3) Added a worker that will periodically call the cleanupmetric function

The worker never gets called - except in tests - that will come in a follow up pr.
The CleanupMetrics function currently just returns an error. In a follow up it will return a list of the uuids that were deleted.

This pr follows on from: https://github.com/juju/juju/pull/562