Revert "[TEST] re-enabled AwaitsFix for LoggingConfigurationTests"

This reverts commit c548a526570a016d353fe4a9e67129898cae4178.
Revert "[TEST] added more additional logging to LoggingConfigurationTests"

This reverts commit b3a60130bae321ca5d82c781c88941a3d3df0594.
Revert "[TEST] added additional logging to LoggingConfigurationTests"

This reverts commit c639815af9ca348e9876b1fd513b51a08fd0c65d.
Revert "[TEST] Added awaits fix to failing LoggingConfigurationTests"

This reverts commit f8ea7c15d7b018334b7f0b3a92ba60e7c073c168.
Revert "Core: Fix location information for loggers"

This reverts commit 4ebbb657d853895b543a42451ee84975ddf8e925.
[TEST] Upgrade test can only run if major or minor version differs
Core: Fix location information for loggers

This change corrects the location information gathered by the loggers so that when printing class name, method name, and line numbers in the log pattern, the information from the class calling the logger is used rather than a location within the logger itself.

A reset method has also been added to the LogConfigurator class which allows the logging configuration to be reset. This is needed because if the LoggingConfigurationTests and Log4jESLoggerTests are run in the same JVM the second one to run needs to be able to override the log configuration set by the first

Closes #5130, #8052
Plugins: Support usage of ES_JAVA_OPTS in plugin commands

As that environment variable can contain elasticsearch specific configuration
like the path to a configuration, it makes sense to support in both
elasticsearch commands.

Closes #8288
[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.