Rework category management
This is needed in my work to implement the sidebar (part of #1111 (closed)). It refactors how category management works, to separate enumeration of the categories from refining them. The former can be sync (gnome-software only ever uses categories from a static list; there appears to be no need for this to be done in a plugin). The latter, which is where the number of apps in each category is calculated, has to be async since it relies on plugin-specific data from appstreams.
This eliminates two plugins, which should make gnome-software slightly more performant everywhere (because every plugin job now has to iterate over two fewer plugins), but I haven’t measured this. It should also reduce the memory consumption slightly as now more of the category data is static, but I haven’t measured that either.
It includes various API additions and breaks in the libgnomesoftware API, which is OK because it’s not a stable API.
The sidebar needs the categories to be enumerated, but it doesn’t need them to be refined, which is why I’m changing this. The rest of the sidebar work (which I’m finishing off and tidying up ready for submission) depends on this set of patches.