Move the clone functions around, and tweak them a little bit,
so other people can use them outside of the Update object.
Merge branch 'master' of gitserver.ixsystems.com:/git/repos/freenas-build/freenas