MINOR: fd: pass the iocb and owner to fd_insert()

fd_insert() is currently called just after setting the owner and iocb,
but proceeding like this prevents the operation from being atomic and
requires a lock to protect the maxfd computation in another thread from
meeting an incompletely initialized FD and computing a wrong maxfd.
Fortunately for now all fdtab[].owner are set before calling fd_insert(),
and the first lock in fd_insert() enforces a memory barrier so the code
is safe.

This patch moves the initialization of the owner and iocb to fd_insert()
so that the function will be able to properly arrange its operations and
remain safe even when modified to become lockless. There's no other change
beyond the internal API.
diff --git a/src/hathreads.c b/src/hathreads.c
index fea4ffe..fd0eb68 100644
--- a/src/hathreads.c
+++ b/src/hathreads.c
@@ -48,10 +48,7 @@
 
 	rfd = threads_sync_pipe[0];
 	fcntl(rfd, F_SETFL, O_NONBLOCK);
-
-	fdtab[rfd].owner = thread_sync_io_handler;
-	fdtab[rfd].iocb = thread_sync_io_handler;
-	fd_insert(rfd, MAX_THREADS_MASK);
+	fd_insert(rfd, thread_sync_io_handler, thread_sync_io_handler, MAX_THREADS_MASK);
 
 	all_threads_mask = mask;
 	return 0;