bug 884076 Add simple tree implementation
Merge pull request #1037 from jsantell/util-tree

fix bug 884076 Add simple tree implementation, r=@gozala