Add download handler test
Change cleaner timout logic

Previously it would set an interval and wake up unfailingly.
Now, the cleaner will set a timeout for whenever the oldest item
in the cache will expire. Or 5 minutes if the cache is empty to
catch any cache entries. That could also be made more elegant.