When the epoll mechanism is available in the system library, use it.
Rewritten processing of file events: when (e)poll completes, all pending
events are scanned and the corresponding files are relinked to another
list. Then this list is processed entry by entry and callbacks are
performed. When file_add() or file_del() is requested from the callback
function, the file is just relinked to the main file_list and the worst
thing which can happen is that an event will be postponed to the next
iteration of the main loop.
To achieve this, I had to decouple the order of entries in the poll_table
from the order of files in the file_list by introducing an auxiliary
array of pointers mapping poll_table entries to file structs.
All tricks with stopping the event scanning loop when poll_table_obsolete
becomes set are gone.