[BUGFIX] Correctly remember acquired shared locks

If a shared lock is acquired, that fact must be remembered in the
Locker object, so that it can be properly released later.

Resolves: #63087
Releases: master, 6.2
Change-Id: Ic7b59d3c437a71193c580b279a6795aaad334108
Reviewed-on: http://review.typo3.org/34384
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Alexander Opitz <opitz.alexander@googlemail.com>
Tested-by: Alexander Opitz <opitz.alexander@googlemail.com>