flatpak: Use flatpak_transaction_add_rebase_and_uninstall() if available
This function was introduced in Flatpak 1.15.6. It is effectively the combination of flatpak_transaction_add_rebase() and flatpak_transaction_add_uninstall(), handling the NOT_INSTALLED case itself, and with the improvement that if installing the new app fails, the old app is not uninstalled.
While 1.15.6 is a pre-release, it is actually shipped in some stable distros, notably Fedora 39.
Fixes #2140 (closed)