Light refactoring of RBT/RBTDB cleaning
Make the dead nodes cleaning more aggressive, fix the locknums for implicitly created RBT nodes, and refactor the purge_tree()
to do less layer violations. Finally, cleanup some dead parts of RBT.
Edited by Ondřej Surý