[STORE] Cut over MetaDataStateFormat to NIO Path API

This class already uses Path most of the time since it
uses ATOMIC_MOVE. This commit makes it a bit more consistent.
Forgot to cut over the child filter in nested filter to use fixed bitset cache.
Reroute shards automatically when high disk watermark is exceeded

This adds a Listener interface to the ClusterInfoService, this is used
by the DiskThresholdDecider, which adds a listener to check for nodes
passing the high watermark. If a node is past the high watermark an
empty reroute is issued so shards can be reallocated if desired.

A reroute will only be issued once every
`cluster.routing.allocation.disk.reroute_interval`, which is "60s" by
default.

Refactors InternalClusterInfoService to delegate the nodes stats and
indices stats gathering into separate methods so they have be overriden
by extending classes. Each stat gathering method returns a
CountDownLatch that can be used to wait until processing for that part
is successful before calling the listeners.

Fixes #8146
Use a 1024 byte minimum weight for filter cache entries

This changes the weighing function for the filter cache to use a
configurable minimum weight for each filter cached. This value defaults
to 1kb and can be configured with the
`indices.cache.filter.minimum_entry_weight` setting.

This also fixes an issue with the filter cache where the concurrency
level of the cache was exposed as a setting, but not used in cache
construction.

Relates to #8268
Logs: Change log level for mpercolate

When using _mpercolate API we log by default a lot of DEBUG `Percolate shard response`.
They should be in TRACE level instead of DEBUG.
Docs: Document action.replication_type setting

Document action.replication_type setting

Closes #8290
Update search-template.asciidoc

Fixed asciidoc typo

Closes #8308
Docs: Add elastic client for Google Go.

Add elastic, an Elasticsearch client for Google Go.

Closes #8302
Update search-template.asciidoc

Clarified using the conditional clause template example as a string
Netty: Add HTTP pipelining support

This adds HTTP pipelining support to netty. Previously pipelining was not
supported due to the asynchronous nature of elasticsearch. The first request
that was returned by Elasticsearch, was returned as first response,
regardless of the correct order.

The solution to this problem is to add a handler to the netty pipeline
that maintains an ordered list and thus orders the responses before
returning them to the client. This means, we will always have some state
on the server side and also requires some memory in order to keep the
responses there.

Pipelining is enabled by default, but can be configured by setting the
http.pipelining property to true|false. In addition the maximum size of
the event queue can be configured.

The initial netty handler is copied from this repo
https://github.com/typesafehub/netty-http-pipelining

Closes #2665
Search: Reduce memory usage during fetch source sub phase.

If includes or excludes are set
XContentFactory.xcontentBuilder() allocates a new
BytesStreamOutput using the default page size which is 16kb.

Can be optimized to use the length of the sourceRef because
that is the maximum possible size that the streamOutput will
use.

This redcues the amount of memory allocated for a request
that is fetching 200.000 small documents (~150 bytes each)
by about 300 MB

Close #8138
Tests: Move logSegmentsState to shared location, and remove no longer
needed verbose logging from upgrade test.
Core: Allow to configure custom thread pools

Closes #8247
Tests: Remove accidentally added bwc behavior for auto choosing a
version.

An early version of #7966 had the ability to choose a bwc version
automatically, but this was removed before the change was committed.
However, the change was not removed from the ongoing work in #7922
and it made it in unknowningly.
Packaging: Export JAVA_HOME in RPM init script

Closes #5433
Closes #5434
Tests: Stop measuring request time in HTTP pipelining tests

This destabilizes tests on virtualized hardware. Functionality
testing is sufficient here. Performance tests should to be conducted
elsewhere.
Docs: Add mention of `hyphenation_patterns_path`

Refs ElasticSearch's HyphenationCompoundWordTokenFilterFactory.java.

Closes #8305
Docs: Convert markdown to asciidoc in transport profile docs
Docs: Add elastics-rb to the list of community clients

Closes #8319
Geo: Fix IndexedGeoBoundingBoxFilter to not modify the bits of other filters.

Close #8325