red-black tree: isolate memory allocation

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