Infer dependencies from download strategies and URLs

Closes #20849.
Closes #22871.
vim: hg dep is inferred
MercurialDownloadStrategy: handle corrupt checkouts
MercurialDownloadStrategy: pull quietly in non-verbose mode