Use poll(2), no ppoll(2)

It was using ppoll in order to safely interrupt the polling thread with
a signal.  But non-Linux systems don't have ppoll.  So instead, use poll,
and introduce a pipe which exists just so the polling thread can be woken
by writing a byte.