[libvirt] PATCH: Fix misc locking bugs, and add lock checker