Changes needed by newer Illumos code

These are all of the commits needed to support newer Illumos code.  It also supersedes zfsonlinux/spl#286. I am opening this pull request for comments.