Integrate the following two commits in situ from the illumos-4445fff branch:

	Author: Tim Chase <tim@chase2k.com>
	Date:   Fri Jul 19 07:23:19 2013 -0500

	    Revert d881d33 on the dsl_dataset_destroy() function.  The version I
	    pulled in from Illumos in that commit wasn't up-to-date.  It would have
	    had the effect of reverting the changes to the function from 39809a6.

	    Re-integrate the necessary changes from illumos/illumos-gate@4445fff.

	commit aa2bc8c27ea0ece6e56fa6f7a968e46d859a883c
	Author: Tim Chase <tim@chase2k.com>
	Date:   Thu Jul 18 21:49:48 2013 -0500

	    Apply a few spa_writeable() changes that were made to Illumos in
	    illumos/illumos-gate.git@cd1c8b8 as part of the 3112, 3113,
	    3114 and 3115 fixes.

	    Add a missing call to fnvlist_free(nvl) in log_internal() that
	    was added in Illumos to fix issue 3085 but couldn't be ported
	    to ZoL at the time (zfsonlinux/zfs@9e11c73) because it depended
	    on future work.
Patch the files with the most extensive and most conflicting changes.

NOTE: Must check out the ordering between the minor ops and the
rename near the XXXtsc comment in zfs_ioctl.c.