Introduce test for redis auto-reconfiguration and improved structure

This commit adds RedisController so that auto-reconfiguration for redis
may be tested. However, most changes in this commit refactor the existing
code to avoid code duplication.