[RECOVERY] Increment Store refcount on RecoveryTarget

We should make sure we have incremented the store refcount
before we start the recovery on the recovyer target.

Closes #6844
[ENGINE] Mark store as corrupted before sending failed shard

We have to mark a shard as corrupted if necessary before the
shard failed event is fired ie. before we call the corresponding
listener in the engine. Otherwise the shard might be re-allocated
on the same node and just started up without being marked as corrupted.

Relates to #5924
[Transport] possible NPE during shutdown for requests using timeouts

Closes #6849
significant terms: infrastructure for changing easily the significance heuristic

This commit adds the infrastructure to allow pluging in different
measures for computing the significance of a term.
Significance measures can be provided externally by overriding

- SignificanceHeuristic
- SignificanceHeuristicBuilder
- SignificanceHeuristicParser

closes #6561
Analysis: Improve Hunspell error messages

The Hunspell service would throw a confusing error message if more than
one affix file was present.  This commit distinguishes between the two
error cases: where there are no affix files and when there are too many
affix files.

Also implements lazy dictionary loading, which was used in the tests
but not implemented.

Closes #6850
[TEST] For connection rules make TransportAddress the identity instead of DiscoveryNode.

For unicast ping the DiscoveryNode identity is based on its id, which in that stage is a dummy value, this breaks any rule in the mock tran
However the TransportAddress is a valid value in unicast ping and all other places, so that is a better alternative.

Closes #6836
Test: add test case verifying updating merge IO throttle settings works

Closes #6842
[Test] testSingleNodeWithFlush should wait for yellow

O.w. it can restart a node before all primaries are started , leading to a red state down the road...
Indexed Scripts/Templates: Add support for storing/deleting/getting scripts/template from an index.

This change allow elasticsearch users to store scripts and templates in an index for use at search time.
Scripts/Templates are stored in the .scripts index. The type of the events is set to the script language.
Templates use the mustache language so their type is be "mustache".
Adds the concept of a script type to calls to the ScriptService types are INDEXED,INLINE,FILE.
If a script type of INDEXED is supplied the script will be attempted to be loaded from the indexed, FILE will
look in the file cache and INLINE will treat the supplied script argument as the literal script.
REST endpoints are provided to do CRUD operations as is a java client library.
All query dsl points have been upgraded to allow passing in of explicit script ids and script file names.
Backwards compatible behavior has been preserved so this shouldn't break any existing querys that expect to
pass in a filename as the script/template name. The ScriptService will check the disk cache before parsing the
script.

Closes #5921 #5637 #5484
Docs: Update query-string-syntax.asciidoc

Closes #6853
[TEST] fix compile problems on Java 8
[TEST] Fix test issues with branches still using mvel as default scripting language
[TEST] Fix test relying on order of json for matching
Benchmarks: Re-factor to use cluster metadata for state

Major re-factoring to use a dual-channel strategy for executing
benchmarks. Uses cluster metadata for managing lifecycle events, but
transport channel to send benchmark definitions and results between
master and executor nodes.
Fixes