Fixup variables and definition names in rbtree code

Switch to using talloc for rbtree node allocation