gave threads names for eaiser debugging
swapped from using select/pselect to poll/ppoll, fixed some problems when lots of using connecting, using signals instead of self-pipe to interrupt blocking io again