Add cleanup function to remove expired items.
Add cleanup function to remove expired items.

On a sufficiently large cache, the cleanup function could take a while. It
uses the write_lock, so it can be run in a thread safely, in that case.

sopoforic/gemstash