Added support for sorting buckets based on sub aggregations

 Supports sorting on sub-aggs 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)

 NOTE: this commit adds a constraint on what should be considered a valid aggregation name. Aggregations names must be alpha-numeric and may contain '-' and '_'.

 Closes #5253
Nicer failure message when node should not connect to another in nodes API
There are cases where nodes should not connect to another node. For example, client nodes do not connect to other client nodes. When executing a nodes level API, we should have a nicer failure indicating that, and not log it by default, as its not a real failure
Added support for aliases to index templates

Adapted existing PR (#2739) to updated code (post #4920), added tests and docs (@javanna)

Closes #1825
Improved how aliases get parsed in create index

Added also CreateIndexRequest#aliases(BytesReference) method
[TESTS] Fixed YAML in put_templates test
Added support for char filters in the analyze API

Closes #5148
[TEST] removed explicit index deletion from AnalyzeActionTests, more ensureGreen
since we no longer have bytebuffer dir, this test is not needed
Introduced a new IMMEDIATE priority - higher than URGENT

* applied to cluster update settings, reroute, node join/leave events, node failure

Closes #5062
[TEST] Replaced RestApiParser assertions with exceptions for better error messages
[DOC] The percentiles aggregation is coming in 1.1.0.
Fix small typo in percentiles doc
[DOCS] Multiple doc fixes

Closes #5047
Display all available endpoints by default at /_cat

Closes #5106
Increase RamAccountingTermsEnum flush size from 1mb to 5mb

Reduces the number of logs when TRACE logging is turned on for the
circuit breaker