Refactor code to allow metric value to be incremented and reset...

The value for the specified metric is reset to zero if it has not been
set in the last hour. This allows for the metric data points to increase
but also reset themselves if they don't occur often enough