[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/34374
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
Reviewed-by: Alexander Opitz <opitz.alexander@googlemail.com>
Tested-by: Alexander Opitz <opitz.alexander@googlemail.com>