Restructure zfs_readdir to fix regressions

This does the following:

1. It creates a uint8_t type value, which is initialized to DT_DIR on
dot directories and ZFS_DIRENT_TYPE(zap.za_first_integer) otherwise.
This resolves a regression where we return unintialized values as the
directory entry type on dot directories. It was introduced by commit
8170d281263e52ff33d7fba93ab625196844df36.

2. It restructures zfs_readdir code to use `uint64_t offset` like Illumos
instead of `loff_t *pos`. This resolves a regression where regression
where negative ZAP cursors were treated as if they were dot directories.

3. It restructures the function to more closely match the equivalent
function in Illumos and removes the unused variable outcount, which was
only used on Illumos.

Closes zfsonlinux/zfs#1750

Signed-off-by: Richard Yao <ryao@gentoo.org>