Split out B-tree logic from SBBF02 to BTreeDB4

This change also does some naming refactoring to clean things up a
little.