split non-memory management btree functions into bcore