[BUGFIX] Stabilize site lock and release lock upon errors
This change adds a separate file to track the status of the
site lock in addition to the actual lock file.
Besides this registers ``LockManager::unlockSite()`` as shutdown
function to make sure that the lock is released when the scripts
ends, to prevent that a site stays locked if an PHP error or
Due to a regression introduced with
Ib701d67b3c7ed81a09e340583ffd2ee768857b83 the site lock could not
be released reliably on Windows systems because the lock file
was not unlinked. This is solved by using an additional file to
track the status of the lock.
Releases: master, 3.0, 2.3