Merge changes from trunk (r8588:r8621).
Merge changes from trunk (8219:8527) to cli project.
freenas8-plugins -> cli.