ztree: add missing autofree to ztree_dup()

Like zhash_dup, the newly created tree should have autofree.
ztree: fix comments around ztree_save/load

Correct some obvious copy/past oversights
ztree: add some tests for ztree_update

Need to check value overwrite path
ztree: switch to alternative source

Use a version of red-black tree with a more liberal license.
The main difference in this implementation is how the root node and
the nil node are encoded.
Merge pull request #192 from shemminger/master

ztree  update, fixes and redo with MIT code
Tentative fix for #187
Update flags to build on SmartOS / Solaris
zbeacon: improve search for interface to skip interfaces with null broadcast address, which happens on SmartOS / Solaris.
Merge branch 'smartos'