Abstract the bucket initialization code

In order to correctly reflect time buckets that don't have any flows
we need to pre-create the hash for each time bucket.  I'll need this
code in a few places so I pulled it out of where it was being used and
made it a bit more generic.