Limit items returned to filtered search input

This is a follow up from !18761 (comment 234289529).

Currently, when a user visits the Issue or Merge Request search page and adds a filter (i.e. Label:, Milestone:, Release:, etc.), all of the associated items are returned as JSON:

image

This result is then cached and used to do a client-side filter as the user types.

At the time of writing the label endpoint returns close to 1000 JSON records for https://gitlab.com/gitlab-org/gitlab. It's possible that the new Release: filter will return at least this many records, and potentially many more for clients who are heavy users of CD. This has the potential to be a performance problem.

This issue is specifically for the Release: filter, but we may want to apply whatever solution we come up with to other filters as well (particularly Label:).

Edited by 🤖 GitLab Bot 🤖