A cache to avoid recomputing computation on stable data.

This PR is best described by the documentation on the included `cache.py`.  A summary of what went into it:
- a weeklong trip to Portland,
- ~14 food carts,
- ~5 coffee shops, and
- many miles of walking around.
Maybe this function should return empty iterators for buckets which don't have any events? Would make the semantics cleaner?