Lean up the redis connection handeling.

* Move the url parsing to one func in utils
* Contain redis code in the locking file as it is the only guy in utils using
Related: #31