[jan] Add unit tests.
[jan] Fix retrieving information for permanent locks.
[jan] Don't make lock non-permanent when resetting a permanent lock.
[jan] Deny exclusive lock if shared locks exist.
[jan] Fix retrieving lock list if permanent locks exist (piper@hrz.uni-marburg.de, Bug #12077).