perf: improve packages search-query

Improves performance for queries with large result sets.

The "group by" clause can be removed for all search types but the keywords.

Signed-off-by: moson-mo <mo-son@mailbox.org>
2 jobs for query-perf-pkg-search in 2 minutes and 39 seconds (queued for 2 seconds)