tdb2: unify tdb1_traverse into tdb_traverse