Locked object lists per thread need to be cleaned up

Locking an object shouldn't function as a GC root keeping the object
alive indefinitely. If the object isn't reachable anymore, we can remove
it from the list safely. Since nothing points to it anymore, nothing can
be waiting for it to unlock.