add Detour::Group#database_group_flags
add some relations to ActsAsFlaggable
simplify Flaggable#unfiltered_features with Arel