#29132t3lib_lock: Clean up constructor and add unit tests
Description
t3lib_lock can be cleaned up a bit: The constructor currently returns values which is impossible, one error case is turned into an exception. The constructor is additionally covered with unit tests.