Replace with_lock with synchornize

to make it compatible with the built-in Mutex
README: fork info
Customizable LockError class
Avoid blocking in setnx-get loop