add LockManager to support both

```
obj, lock = Foo.get_locked_obj(id)
```

and

```
with Foo.get_locked_obj(id) as obj:
    ...
```

syntaxes
add option to couch doc locking to degrade gracefully when redis is down
make degrade_gracefully for redis locking more consistent
(redis locking) pop degrade_gracefully so it does not get passed on
Small fixes
Small fix
Merge pull request #179 from dimagi/lock-context-manager

add LockManager