refactor: unify terms and significant_terms parsing

Both need the requiredSize, shardSize, minDocCount and shardMinDocCount.
Parsing should not be duplicated.
refactor: make requiredSize, shardSize, minDocCount and shardMinDocCount a single parameter

Every class using these parameters has their own member where these four
are stored. This clutters the code. Because they mostly needed together
it might make sense to group them.
use shard_min_doc_count also in TermsAggregation

This was discussed in issue #6041 and #5998 .

closes #6143