See the individual commit messages.
This uses some of the new GsAppQuery
functionality to push the remaining bits of sorting, filtering and truncation in gs-overview-page.c
into the queries, so that they can be optimised a bit more.
In particular, this fixes a bug where the query would truncate the number of featured apps to 20 before then filtering them for hi-res icons. The filtering could potentially remove so many apps that the featured carousel would then have fewer than 5 apps in it.
This also reworks gs_app_list_randomize()
to be more performant, especially in terms of temporary memory allocations.