Make global lock timeout a variable value

Set it to 0.1 in tests, so global lock tests are faster. They were
spending 10 seconds just waiting for the lock that would never arrive.
There's no difference really if it waits for 10 seconds or 0.1 seconds
in tests