inmem: Inline a few functions into getInterval
inmem: Inline a few functions into getInterval

These functions were only called in a single place, and repeated some of the same logic.

This change is made in preparation for streaming metrics.

armon/go-metrics