cargo: Avoid extra / in URL

Previously: if the index URL, as configured by the project, ended
in a /, then the cargo plugin would append a second slash in the full
URL of a crate. In other words, this would create a URL with two slashes.
This would cause "Permission Denied" errors from cargo's default mirrors.

This change uses urljoin to construct a valid URL with a single slash.

Some buildstream projects have a convention that all of their aliases
should end with a /. This helps keep project configuration consistent.
This changes permits projects to continue doing so.
1 file changed