events: Prevent race condition around SIGCHLD
There seems to be a race condition in libevent around signal handling (the signal gets stuck forever, waiting for something more to wake it up, which never comes). Try to fix it with the usual self-pipe trick.
This is for #95 (closed).
Edited by Vojtech Myslivec