remote-delete: Manually delete origin remotes if no refs were removed
remote-delete: Manually delete origin remotes if no refs were removed

There are a few cases where -origin remotes don't get removed when
their refs are uninstalled, most notably when xa.noenumerate is set, or
somehow the uninstall gets interrupted at the wrong time. Regardless
of the reason, the remote could never be removed after this, unless a
new ref is installed from it and then removed, or noenumerate is set.

Closes: #2920

Closes: #2953
Approved by: alexlarsson

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