Refactor record picker into view helper

Similar to the previous commit I have created a view helper to generate
the record picker. For now, only to pick a best record.

Signed-off-by: Konrad Reiche <konrad.reiche@gmail.com>
Add record picker for worst records, too

I generalized the code a bit in order to make the record picking
available for the bad quality records as well.

Signed-off-by: Konrad Reiche <konrad.reiche@gmail.com>
Display actual repository size, not theoretical

When harvesting metadata I store the size of the harvest source as well.
Until now, I have displayed this size, but often it is different from
the actual datasets in the database. Hence, I changed this.

Signed-off-by: Konrad Reiche <konrad.reiche@gmail.com>
Use Scroll API to fetch all metadata

The Scroll API is optimized to fetch large amount of documents. For the
metric computation all documents are required which makes the API useful
for this kind of task.

Per shard one request will be executed, hence I am adjusting the size as
well. My ElasticSearch instance is configured with 5 shards. For reasons
unknown diving the total count through 5 does not result in a result set
containing all documents. For that reason, division through 4.

Signed-off-by: Konrad Reiche <konrad.reiche@gmail.com>