mainloop: epoll management overhaul, delayed destruction fixes.
Reworked main fdtable and epollfd manipulation to be more consistent
and clearer by separating them out to a set of epoll_* functions of
their own. Planted also quite a number of debug messages to the delete-
code paths.
Also fixed a few delayed destruction corner-case crashes. The code
now uses a dedicated hook for the pending deletion list instead of
reusing the main object hook (which cannot be done in some cases).
This turned the remaining type-specific delete_* functions practically
no-ops (they just unlinked the objects from their repective lists,
also done by the delayed purging code) so they were removed.
Probably we should make delayed destruction readiness more explicit
by putting the common deleted_t fields behind a macro.