SaaS index worker: Deduplicate namespaces and remove root check
Description
This improves the Active Context SaaS indexing worker. It is a follow-up from !206226 (comment 2787062599).
- Deduplicates the possible duplicated namespaces. I think the root namespace could have multiple add-on types, for example:
duo_coreandduo_enterpriseand it would appear twice in the query results. - Removes the unnecessary root check. I've tried to create a spec scenario, but it's not possible because
namespace.root?is redundant.GitlabSubscriptions::AddOnPurchasehas avalid_namespacethat includesnamespace.root?.
Related to #569746 (closed).