Metrics: Split metrics into package.
Metrics: Add some tests from GraphiteBase.
Query: Clean up tests a little bit.