Fix RBTreeClear, add test

Root node was freed and size was not reset.