Minor fixes in genutils, and a BIG fix for threading. I _think_ I got
Ctrl-C to work in the threaded shells, and the solution is in fact
absolutely trivial. The new code is _much_ simpler than what we had! This
needs testing, because I find it almost hard to believe that we hadn't tried
this before. But if it works, great! The only limitation is that in
threaded mode, the traceback shows the internal sigint handler frame. Big
deal, it's just cosmetic.