Adding additional robustness to Redis connections

Previously, if Redis goes away or the connection is interrupted, NGINX
would fail to process the request. This commit establishes connection
checks and reconnection logic. Additional items will be added to
librepsheet to make this more sound.