[socket-io] Cleanup of the code to ease switching to signalless interrupts