Mercurial import: validate remote URL
GitLab 14.5 introduces in imports validation that the remote URL is, indeed, a Git repository.
This is not to be confused with simple JavaScript alerts in case the URL does not end with .git
: we're speaking about performing an actual request on a Git-specific endpoint.
We should do the same for Mercurial repositories, and provide it in a way that can be reused easily for the likes of #406.