add __enter__ and __exit__ for python LockWrapper, and support recursion