marshal LeakyBucket objects before caching

Needed fix for compatibility with Redis, which was
storing LeakyBuckets as Strings.