libc: Add fdopendir from musl to fix missing symbol

When using 'zpool.so import' fdopendir symbol is missed.
Code taken from musl libc.

Additional details:
fcntl(fd, F_SETFD, FD_CLOEXEC) call was removed as the close-on-exec
flag is left unchanged on Linux (Glauber Costa).
Also removing struct __DIR_s definition from fs/vfs/main.c, and
referencing the new one added into libc/dirent/dirent.h.

Reviewed-by: Glauber Costa <glommer@cloudius-systems.com>
Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>