Migrate generic B-tree search functionality from CatalogFile to BTreeFile.

Now other B-tree files can also take advantage of it.