Update lock_manager.js

thanks Kevan for your deadlock-example. What if we move the control (our if (self.lockOwnerCache[lockName] === owner)) inside the if that checks the timeout (if (elapsedTimeMillis > timeout)? I've committed the change in this request. 	
This modification should fix both the problems: it cuts down the probability that a request gets the lock of another request (it passed my test) and we don't get into a deadlock.