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 Name Job ID Coverage
  Build
passed build-gnome-software #34305

00:06:01