Fix LockingCache expiry behaviour. #44

Fix #44, make the cache actually cache for the specified timeout rather than until initial callbacks happen.

Also adds some tests around LockingCache.