Use selfpipe for event loop wakeup. Refactor event/net interface once more (linux port is not updated yet).