Lock.release(): reorder code so assignment to
self.acquired_until is protected by the lock.
Merge pull request #384 from dystedium/fixlock

Lock.release(): reorder code so assignment to self.acquired_until is protected by the lock.