Reduce watchdog thread wakeups.

Use a pipe as a waitable event object that select() can see, so that
adding a socket to the watchee list forces the watchdog thread to
loop around and call select() again with the new watchee list.