cleaning up, almost fully functional
not safe to pass NULL to ldns_rbtree_insert