Refactor redis pool creation and tests code
Related to #163 (closed).
This MR moves the Redis pool creation logic from the registry App into the cache/redis
package, so that it can be reused for tests.
It also improves both the pool creation logic and the existing tests.