Infer dependencies from download strategies and URLs

Closes #20849.
Closes #22871.
vim: hg dep is inferred