Close redis connection when the thread is destroyed

Redis connections weren't being closed when the thread was destroyed causing a large number of connections to remain open unless Varnish was restarted.