[TEST] cat.allocation/One index: allow leading spaces in unassigned shards lines
Cut over to Lucene's TopDocs#merge for shard topdocs sorting.

Closes #6197
Add number of shards statistic to PercolateContext instead of throwing exception.
Certain features like significant_terms aggregation rely on this statistic for sizing heuristics.

Closes #6037
Closes #6123
[TEST] indices.open REST tests need 0 replicas

With replicas the search requests might go to shards that are not ready, since we have a wait for yellow. We can now switch to wait for green as well.
Aggregations: Fixed conversion of date field values when using multiple date formats

When multiple date formats are specified using the || syntax in the field mappings the date_histogram aggregation breaks.  This is because we are getting a parser rather than a printer from the date formatter for the object we use to convert the DateTime values back into Strings.  Simple fix to get the printer from the date format and test to back it up

Closes #6239
[BUILD] pass java exe to plugin install command
[TEST] Use _uid sort field as tie, so that hits with the same score are sorted in the same way in both search responses.