tdb2: Implement tdb_get_flags, tdb_add_flag and tdb_remove_flag.