red-black tree: move memory management in tree

Link: https://github.com/GeneAssembly/biosal/issues/703
Signed-off-by: Sébastien Boisvert <boisvert@anl.gov>