Perform a single query per depends-on deliverables set

Previously a separate query was being done for each BranchNameKey in
each deliverable and this can get quite expensive, especially with
android manifests as the deliverable, since this can result in 600-1000
queries per deliverable, and likely the combination of all those queries
will at most only ever return a change per deliverable. Instead, simply
query for the Change.Key, and post filter the results by BranchNameKey
for each deliverable avoiding the many roundtrip queries.

Change-Id: I6d5a14ca46bc4a9d98eab55c1f49edb2873f28d8
1 file changed