NOT-STABLE: Lots of debugging information, and fixes for threading.

There are still a lot of problems I'm working out with threading.
I've fixed a lot of it, but something is causing invalid frees
to corrupt the stack and sigsegv'ing when more than trivial traffic
is sent to server.  I'm working it out.  Current version is not stable.