Implement early termination for Count API, if threshold is provided

A new request param `threshold` is added, which will allow Count query to early terminate, once the number of matched docs is equal to `threshold` for every shard. This will be helpful for exists-type functionality.
This comment is incorrect, when the document to be percolated contains nested objects or not, there is always one segment... in any case the use of this collector is good for code reuse purposes.