Fixes #37279 - Re-create remotes when the type needs to change
When updating a remote, we need to re-create it instead if the type has changed from uln to rpm or vice versa.
For operations on a remote href, the type is now determined from the href, rather than indirectly from the url. This is more robust since it is the actually relevant source of truth. In addition the remote API selection code is now deduplicated within the new get_remote_api method.
Related issues
Bug #37279: It is possible to end up with the wrong remote type (uln vs. normal) for yum content
Fixes #37279 - Re-create remotes when the type needs to change
When updating a remote, we need to re-create it instead if the type has
changed from uln to rpm or vice versa.
For operations on a remote href, the type is now determined from the
href, rather than indirectly from the url. This is more robust since it
is the actually relevant source of truth. In addition the remote API
selection code is now deduplicated within the new get_remote_api method.