flatpak: Refactor the plugin's setup method

https://phabricator.endlessm.com/T22617
1 job for wip/do-not-disable-flatpak in 6 minutes and 1 second (queued for 1 second)
latest
Status Job ID Name Coverage
  Build
passed #34305
build-gnome-software

00:06:01