metrics aggregation schema changes

This pull request is overdue but necessary as it introduces changes to

* Handled failed aggregations
* Handle reported and inserted late
* Reduce query I/O

More details can be found at https://docs.jboss.org/author/display/RHQ/Aggregation+Schema+Changes.