Better Redis connection handling

Two changes are made:
1) Introduced ability to connect through unix socket.
2) Fixed connection failure handling. Now it successfully fallbacks to backup cache.