This optimizes the way metrics are stored in Redis.
All metrics
Previously metrics metadata was written w/ every recorded metric.
Now we only do this once if we have to.
Histograms
Previously we incremented a counter for each configured bucket.
Now we only increment the counter for the bucket the sample belongs to.
All aggregation is done when reading the metrics.
This optimizes the way metrics are stored in Redis.