Fix lock test failures by taking lock breaking into account.
* tests/test_lockdir.py:
(TestLockDir.test_43_break): Release the lock after breaking and
acquiring it.
* tests/__init__.py:
(TestCase._check_locks): Consider lock breaks as releases.
(TestCase._track_locks, TestCase._lock_broken): Also track broken locks.