Only refine with PackageKit when the state or version number is unknown and required
Only refine with PackageKit when the application history is missing and required
trivial: Add 'refine' as an action to gnome-software-cmd
trivial: The application is installed if we found a desktop file for it
Only refine with PackageKit when the action will be required

This reduces the cost of a default refine down to less than 10ms.
Always return search results back to the shell

You need the previous set of patches to avoid starting up PackageKit on each
application refine.