profile: Only alter XDG_DATA_DIRS if flatpak is still installed
profile: Only alter XDG_DATA_DIRS if flatpak is still installed

In some OSs, removing a package does not immediately remove its
configuration files in /etc. In particular, `dpkg --remove` or
`apt-get remove` in Debian derivatives leaves configuration files intact
so that the package can be reinstalled later without having to
reconfigure it, with `dpkg --purge` or `apt-get purge` used to remove
the configuration files too.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Closes: #2840

Closes: #2849
Approved by: alexlarsson

flatpak/flatpak,flatpak/flatpak,flatpak/flatpak,matthiasclasen/flatpak,matthiasclasen/flatpak,matthiasclasen/flatpak,matthiasclasen/flatpak,matthiasclasen/flatpak,flatpak/flatpak,flatpak/flatpak