adding initial support for aggregating late/past data

There are two main changes in this commit. The first is the initial suppport
for aggregating late data. That is, raw data that is stored after its time
slice has already passed.

The schema for metrics_cache_index is changed slightly as well. We now order by
the time column before the start_schedule_id column. And we are always storing
the day, i.e., hour zero in the time_slice column. This reduces the number of
queries that need to be performed when looking to see if there is past data to
aggregate.

There is still work to do for handling late data along with a bunch of clean
up and refactoring. I am trying to consolidate the logic as much as possible
for aggregating past data and for current data so as to avoid a lot of the code
duplication that is going on right now.