iom_init initializes an I/O multiplexer.
An I/O multiplexer is a context that can be used to do I/O multiplexing with support for multiple
threads. Add events to a multiplexer using iom_add, and then get the next available event with iom_wait.
If you are done and want to signal all the threads something, set a volatile global variable to tell the
threads to stop and then fall iom_abort to tell all pending iom_wait operations in all threads to return
immediately.
After iom_init is done, iom_add and iom_wait can be called from different threads on the same context,
and they will synchronize internally.