common/dir: Factor out a helper function to get a remote’s collection ID
common/dir: Factor out a helper function to get a remote’s collection ID

We need to consistently handle the case where the collection ID is set
to the empty string (and treat it the same as if it were unset). Best
done in a helper function.

Signed-off-by: Philip Withnall <29c2a2ac2a854b9cf047275aa9de346d096be2e0@endlessm.com>

flatpak/flatpak,matthiasclasen/flatpak,flatpak/flatpak,matthiasclasen/flatpak,handsome-feng/flatpak,flatpak/flatpak,matthiasclasen/flatpak,flatpak/flatpak,handsome-feng/flatpak,matthiasclasen/flatpak,handsome-feng/flatpak,flatpak/flatpak,handsome-feng/flatpak,matthiasclasen/flatpak,handsome-feng/flatpak