Optimize work items label filtering query performance

Problem

The work items label filtering query uses ~1GB of buffer and has suboptimal query plans.

Query Plan (without UNION)

https://console.postgres.ai/gitlab/gitlab-production-main/sessions/46337/commands/141400

Reproduce

https://gitlab.com/groups/gitlab-org/-/work_items?sort=created_date&state=opened&label_name%5B%5D=bug%3A%3Avulnerability&label_name%5B%5D=section%3A%3Aai&first_page_size=20

Notes

Edited by 🤖 GitLab Bot 🤖