Added ThreadLock. ThreadLock is a dumb but useful reimplementation of basic notify-interrupt stuff that I use for gentler thread interrupts.