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.
In my tests this reduced the loading time of the Packages page (which queries a list of all packages) from ~1.6s to ~0.5s.
Signed-off-by: moson-mo mo-son@mailbox.org