[TEST] Mute IndicesCustomDataPathTests
Discovery: only retry join when other node is not (yet) a master

When a node tries to join a master, the master may not yet be ready to accept the join request. In such cases we retry sending the join request up to 3 times before going back to ping. To detect this the current logic uses ExceptionsHelper.unwrapCause(t) to unwrap the incoming RemoteTransportException and inspect it's source, looking for ElasticsearchIllegalStateException. However, local ElasticsearchIllegalStateException can also be thrown when the join process should be cancelled (i.e., node shut down). In this case we shouldn't retry.

This commit adds an explicit NotMasterException to indicate the remote node is not a master. A similarly named exception (but meaning something else) in the master fault detection code was given a better name. Also clean up some other exceptions while at it.

Closes #8972
Revert "Add index.data_path setting"

This reverts commit b2ec19ab360cc5f23d3cde391c8fc6e700dcb41f.
[TEST] Inject IndexSettings, not node Settings objects

Guice was injecting the wrong Settings object
doc: transport sniff only adds data nodes
[docs] pedantry

Closes #8982
Update getting-started.asciidoc

Missing -X flag at the curl template

Closes #8977
Update percolate.asciidoc

wrong type used in the -GET request

Closes #8942
Aggregations: reduce histogram buckets on the fly using a priority queue.

This commit makes histogram reduction a bit cleaner by expecting buckets
returned from shards to be sorted by key and merging them on-the-fly on the
coordinating node using a priority queue.

Close #8797
Documented the new terminate_after querystring option on search as implemented in #6885
Revert "Aggregations: reduce histogram buckets on the fly using a priority queue."

This reverts commit 5694626f79555af65b1109125afef49657186f0a.
Term Vectors: support for version and version_type

This commit adds support for version and version_type to the Term Vectors API.
This could be useful in the following case whereby the user gets a document
and later wants to generate its TVs. With version, this would ensure that only
the TVs of that particular document are generated, and error out if the
document has been updated in between.

Closes #7480
Aggregations: reduce histogram buckets on the fly using a priority queue.

This commit makes histogram reduction a bit cleaner by expecting buckets
returned from shards to be sorted by key and merging them on-the-fly on the
coordinating node using a priority queue.

Close #8797
Core: ignore known idle threads by default in /_nodes/hot_threads

Add a new ignore_idle_threads boolean option (default true) to
/_nodes/hot_threads, to filter out threads in known idle places like
waiting on a socket select or on pulling the next task from an empty
queue.

Closes #8985

Closes #8908