New resolver incorrectly tries unneeded candidates
New resolver incorrectly tries unneeded candidates

When the new resolver needs to upgrade a package, it puts the
already-installed package in the middle of the candidate list obtained
from indexes. But when doing it, the candidate list is eagerly consumed,
causing pip to download all candidates.

pfmoore/pip,pypa/pip,sbidoul/pip,pradyunsg/pip,pradyunsg/pip,pfmoore/pip,pypa/pip,sbidoul/pip