Percentiles aggregation.

A new metric aggregation that can compute approximate values of arbitrary
percentiles.

Close #5323
Fix test bug: a too low compression level can make accuracy terrible.
[DOCS] Java API JSON typo
Terms aggs: only use ordinals on low-cardinality fields by default.

Close #5303
Fix sorting of NaN values in terms aggregations.

Closes #5236.
Added unit tests for terms and histogram sorting on sub aggregations that return NaN.
Fix NPE/AIOOBE when building a bucket which has not been collected.

Close #5048
Fix `metric` impl on unmapped fields.
Rewrite BytesStreamOutput on top of BigArrays/ByteArray.

Fix for #5159
check for null term in PagedBytesEstimator.bytesPerValue()

Fixes #5326
Implement custom circuit breaker estimator for parent/child field data
Added support for sorting buckets based on sub aggregation down the current hierarchy. This is supported as long as the aggregation in the specified order path are of a single-bucket type, where the last aggregation in the path points to either a single-bucket aggregation or a metrics one. If it's a single-bucket aggregation, the sort will be applied on the document count in the bucket (i.e. doc_count), and if it is a metrics type, the sort will be applied on the pointed out metric (in case of a single-metric aggregations, such as avg, the sort will be applied on the single metric value)

 Closes #5253