Allow optional cache key to take in a proc

@joshblour 
Hey, I've amended the way optional keys are handled such that a `proc` can be passed in.

It's useful for cases whereby other attributes of an item in the collection needs to be used as a cache key, other than the default `cache_key`. In some cases it is not feasible to override the `cache_key` method of the items itself.