Add test cases for exiting/mode-changing lock holders

This crashes old versions of the kernel. Kernel patches fixing the
various panics have been merged into the kernel staging tree.