Internal: Add all unsafe variants of LZF compress library functions to forbidden APIs.

The "optimized" encoders/decoders have been unreliable and error prone.
Also, fix LZFCompressor.compress to use LZFEncoder.safeEncode, which
creates a new safe encoder, instead of using a shared encoder (which
is not threadsafe).

closes #7468
[Test] testLargeClusterStatePublishing - bound max shard no to number of nodes and set replica count to 0

ensureGreen sometimes times out due to too many shards and GC kicking in
Parent/child: If _parent field points to a non existing parent type, then skip the has_parent query/filter

Closes #7362
Closes #7349
Parent/child: Add missing support for the field data loading option to the `_parent` field.

Closes #7394
Closes #7402
Mappings: Added support for empty field arrays

Close #7271
Use physical name to compare files from snapshot metadata

The comparison and read code in the BlobStoreIndexShardRepository
used the physicalName and Name in reverse order. This caused
SnapshotBackwardsCompatibilityTest to fail.

This reverts commit 636af40da1ae22d5b7c8a81435987768e9cc3ac9
Indexed Scripts : Change preference and thread option for GetRequest.

This change forces the GetRequest when a script is being loaded from an index
to use preference("_local") and threaded(false) to prevent the script service from
forking for GetRequests.
[TEST] removed AwaitsFix, added checks to make sure indexed scripts are put correctly
[TEST] only bump replicas if we have enough nodes in the cluster
Index templates: Made template filtering generic and extensible via plugins

Added the ability to register template filters that are being applied when a new index is created. The default filter that checks whether the template pattern matches the index name always runs first, additional filters can also be registered so that templates can be filtered out based on custom logic.

Took the chance to add the handy source(Object... source) method to PutIndexTemplateRequest and corresponding builder

Closes #7459
Closes #7454
explain score: fix explanation streaming

Complex explanations were always read as Explanations. Depending
on if the response was streamed or not the explanation was
therefore generated by a ComplexExplanation or by a regular
Explanation.

closes #7257
bool query: parser should return match_all in case there are no clauses

This also fixes has_parent filters with a nested empty bool filter
(see test SimpleChildQuerySearchTests#test6722, the test should actually expect
either 0 results when searching for has_parent "test" or one result when
search for has_parent "foo")

closes #7240
closes #7347
Fielddata: Remove soft/resident caches.

These caches have no advantage compared to the default node cache. Additionally,
the soft cache makes use of soft references which make fielddata loading quite
unpredictable in addition to pushing more pressure on the garbage collector.

The `none` cache is still there because of tests. There is no other good
reason to use it.

LongFieldDataBenchmark has been removed because the refactoring exposed a
compilation error in this class, which seems to not having been working for a
long time. In addition it's not as much useful now that we are progressively
moving more fields to doc values.

Close #7443
Add translog checksums

Switches TranslogStreams to check a header in the file to determine the
translog format, delegating to the version-specific stream.

Version 1 of the translog format writes a header using Lucene's
CodecUtil at the beginning of the file and appends a checksum for each
translog operation written.

Also refactors much of the translog operations, such as merging
.hasNext() and .next() in FsChannelSnapshot

Relates to #6554
[Discovery] lightweight minimum master node recovery
don't perform full recovery when minimum master nodes are not met, keep the state around and use it once elected as master
[Internal] make no master lock an instance var so it can be configured
[Discovery] add rejoin on master gone flag, defaults to false

defaults to false since there is still work left to properly make it work
[Discovery] Make noMasterBlock configurable and added simple test that shows reads do execute (partially) when m_m_n isn't met
[Discovery] Enable `discovery.zen.rejoin_on_master_gone` setting in DiscoveryWithNetworkFailuresTests only.
[Discovery] Changed the default for the 'rejoin_on_master_gone' option from false to true in zen discovery.

Added AwaitFix for the FullRollingRestartTests.