core: add a function to check if red-black is empty

Signed-off-by: Sébastien Boisvert <boisvert@anl.gov>