Load patch set approvals in parallel

ResultSet is a future-like interface, the database system is free
to execute each result set in asynchronously in the background if
it supports that. gwtorm's default SQL backend always runs queries
immediately and then returns a ListResultSet, so for most installs
this has no real impact in ordering.

For the system that runs gerrit-review, each query has a high cost
in network latency, and can treats ResultSet as a future promise to
supply the matching rows. Getting all of the necessary ResultSets
up front allows the database to send all requests to the backend
as early as possible, allowing the network latency to overlap.

Change-Id: I9566dcc24e37ce857ed194e9f30767880a4b53c7
2 files changed