Fix build issue and darlingserver CPU consumption
We weren't sleeping properly because we were using edge-triggered epoll with EPOLLOUT (which kept returning true since there was space in the buffer). Now we use edge-triggered epoll.
Note that we have to keep track of when the descriptor is readable/writable ourselves because as long as the descriptor remains writable, epoll won't notify us; we use an eventfd to notify the main loop when we have a message ready to send. The main loop will monitor it when the descriptor is writable; whenever the descriptor becomes unwritable, we stop monitoring the eventfd (since we can't send anything until it becomes writable again).