gettid and socket run-away

So, we had some runaway threads, but which one. Standard python
does not give you a thread ID, so I made a dodgy function instead.

Knowning now that the poller thread was the problem ,what was the
problem?

The dispatcher had a small but significant bug where I was closing
using the socket, not the _fileno. The loop was in tcpclients where
the session closed, using the wrong fd, so it was trying to close
again, with the wrong fd, and so it goes.

I then tried to close the fd after asyncore got to it, which sets
_fileno to None, hmm not good either!