shards: factor out collectSender (#440)
This is the functionality used in Search to aggregate factored out into
a StreamSender. The intention is to reuse this in streaming for initial
ranking work.
Additionally we introduce some logic to aggregate progress. This is the
same logic used in streaming. Right now the batch interface doesn't set
progress since that doesn't make sense, so clients will ignore it. When
collectSender is used by streaming it is important that the field is
set.
Test Plan: covered by existing tests