Support unlocking expired timeout with setnx/getset

This patch adds unlocking behavior when a worker somehow gets dead while obtaining a lock without cleaning it up. The code uses a design pattern used in http://redis.io/commands/setnx using SETNX and GETSET, to avoid the race condition.

To make it work i changed the value of lock to be an integer (UNIX timestamp) rather than a time string as it used to be.

This addresses #1.