If `fd_readdir` returns a zero inode, call `fstatat` to get the inode value. (#345)
* If `fd_readdir` returns a zero inode, call `fstatat` to get the inode value.
On some systems, `fd_readdir` may not implement the `d_ino` field and
may set it to zero. When this happens, have wasi-libc call `fstatat` to
get the inode number.
See the discussion in
https://github.com/WebAssembly/wasi-filesystem/issues/65 for details.
* Update the `d_type` field too, in case it changes.