[BUGFIX] Locker throws exception if semaphore can not be acquired

Locker has wrong LockState in semaphore mode, if the lock
could not be acquired.

Resolves: #52048
Releases: 6.2, 6.1, 6.0
Change-Id: Ifdc2f5d9b2a3c35a0ebef54817a56344f27ab15d
Reviewed-on: https://review.typo3.org/23854
Reviewed-by: Stefan Neufeind
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters