- Simplify code path / remove special tevent_add_fd flag to do AIO
and instead perform AIO directly.
- Add fallback to synchronous pread()/pwrite()/fsync() if AIO path
fails with EAGAIN.
- Grow size of kevents array as we hit overload situation. Loop on
kevent() calls while overloaded to avoid an extra call to
talloc_stackframe_pool() / talloc_free().
- Discharge pending immediate event queue after callback in case
callback for fd / aio event submits an immediate to the queue.
- When the tevent timer is being processed, the destructor will
be removed prior to TALLOC_FREE(te) and so exiting destructor here
will not leak memory. This is to avoid potential for NULL dereference