transaction: Sync installed apps' state missing runtime is re-installed

Flatpak changes [1] will start marking apps as updatable if their
runtime component is missing on the installation. These apps will
be shown as updatable in gnome-software updates panel but in the
background they are meant to fetch their missing runtime.

Since many apps can target one runtime, the absence of that runtime
can make many apps show up in the updates panel. In that case,
check if the runtime is downloaded → installed and set all
apps' state back to "installed". This solves the case
if users chooses to click "Update All".

[1] https://github.com/flatpak/flatpak/pull/3204

https://phabricator.endlessm.com/T27077
Status Job ID Name Coverage
  Build
failed #518745
debian-stable-x86_64

00:01:41

failed #518744
fedora-x86_64

00:02:58

 
Name Stage Failure
failed
fedora-x86_64 Build
Uploading artifacts...
_build/config.h: found 1 matching files
_build/meson-logs: found 4 matching files

_build/fedora-x86_64-report.xml: found 1 matching files

Uploading artifacts to coordinator... ok
id=518744 responseStatus=201 Created token=VDRwcsHH
Uploading artifacts...
_build/fedora-x86_64-report.xml: found 1 matching files

Uploading artifacts to coordinator... ok
id=518744 responseStatus=201 Created token=VDRwcsHH
ERROR: Job failed: exit code 1
failed
debian-stable-x86_64 Build
Uploading artifacts...
_build/config.h: found 1 matching files
_build/meson-logs: found 4 matching files

_build/debian-stable-x86_64-report.xml: found 1 matching files

Uploading artifacts to coordinator... ok
id=518745 responseStatus=201 Created token=rryJ4u6H
Uploading artifacts...
_build/debian-stable-x86_64-report.xml: found 1 matching files

Uploading artifacts to coordinator... ok
id=518745 responseStatus=201 Created token=rryJ4u6H
ERROR: Job failed: exit code 1