tdb2: implement tdb_exists and tdb_parse_record