Ensure cache is closed even if `save` or `set` is not called

Fixes #1
Fix suggested by @spion
Receive the cache generation function as a callback to have control
of the control flow and be able to unlock cache
This will break backward compatibility, this branch is experimental so
we can analyze the trade offs
Remove only from test to run all tests
Improve `pool.get` based on @spion suggestions

Fixes #1
Ensure backward compatibility