To check which packages are already downloaded.
For now, this lookup is done in addition to checking the artifacts
from the last snapshot's revisions' metadata, because we did not start
writing ExtIDs yet.
But the ExtID lookup will eventually replace the artifact-based lookup.
This will finally allow us to drop the 'metadata' field of Revision
Depends on D5348