Preserve errno when set by ioctl in zfs_ioctl

Typically we expect IOCTL(2) to return 0 and any real error to be
in zc->zc_ioc_error. However, sometimes an error actually does
occur for ioctl itself, in which case it returns -1 and sets errno.
Now we will allow the value of errno set by ioctl to persist,
rather than overwriting errno with -1.

Incidentally, this stops several of the core dumps that happen
currently when a zfs command is called without superuser
privileges.