Reworked the aggregation scheme

Aggregation scheme was using locks for thread safety.  Swithed to using
a pair of buffers for each thread.
Changes from code review

- Changed the aggregation buffer to not require locks = increased
performance.
- Added an at_exit block to flush the buffer.
- Placed the metric classes in their own module to keep the client's
namespace clean.