Mark 'lucene-expression' as 'provided' in pom.xml

We currently pull in the lucene-expression module that is referenced
by lucene-suggest. Yet, we don't make use of this dependency at all
and it pulls in a bunch of unshaded libs like `antlr` and `asm` which
are pretty common in other projects. We should exclude this
dependency since we don't use it at all and it causes problems
when Elasticsearch is used as a node client. (see #4858)

If we mark the dependency as provided it won't be included in the
distribution.

Closes #4859
Closes #4858
Remove listeners after suite completes in RestTestSuiteRunner

We need to remove the reproduce info printer after the suite
returns otherwise it might print a bogus line if a subsequent
non-rest test fails. The `RunNotifier` is used across suites in
the same JVM and the listener sticks to it.
Made sure rivers _meta documents are retrieved via get with preference _primary

Closes #4864
Parallelized rivers creation in RiverTests#testMultipleRiversStart

Rivers are now registered concurrently from separate threads, one per river.
Make shard balancing deterministic if weights are identical

It happens to be the case that the iteration order of a HashMaps
keyset might be different across runs. This can cause undeterministic
results in shard balancing if weights are identical and multiple shards
of the same index are eligable for relocation. This commit adds
a tie-breaker based on the shard ID to prioritise the lowest shard
ID. This also makes `AddIncrementallyTests#testAddNodesAndIndices`
reproducible.

Closes #4867
Move provided lucene-expression jar below the test-framework

Having a dep that refrences lucene-core before the test framework
confuses some runners.
Documentation for score_mode

Closes #4742
Support multiple rescores

Detects if rescores arrive as an array instead of a plain object.  If so
then parse each element of the array as a separate rescore to be executed
one after another.  It looks like this:
   "rescore" : [ {
      "window_size" : 100,
      "query" : {
         "rescore_query" : {
            "match" : {
               "field1" : {
                  "query" : "the quick brown",
                  "type" : "phrase",
                  "slop" : 2
               }
            }
         },
         "query_weight" : 0.7,
         "rescore_query_weight" : 1.2
      }
   }, {
      "window_size" : 10,
      "query" : {
         "score_mode": "multiply",
         "rescore_query" : {
            "function_score" : {
               "script_score": {
                  "script": "log10(doc['numeric'].value + 2)"
               }
            }
         }
      }
   } ]

Rescores as a single object are still supported.

Closes #4748
Fixed an issue where there are sug aggregations executing on a single shard, the reduce call was not propagated properly down the agg hierarchy.

Closes #4843
fixed license header indentation
[DOCS] More assertive statement about requiring `query` in _count, etc
Serving _site plugins do not pick up on index.html for sub directories

If one asks for `http://es:9200/_plugin/PLUGIN_NAME/` and the the plugin's _site directory contains an index.html file, it will be correctly served.

This is not the case for sub directories: a _site/folder/index.html is not served when requesting  `http://es:9200/_plugin/PLUGIN_NAME/folder/` but one gets a 403 Forbidden response as if trying to browse the folder.

Closes #4845.
fixed the reduce of InternalGeoHashGrid when executing on a single shard
Added more unit like test that verifies that has_child is never cached even if wrapped by another filter.
Throw exception if `cluster.name` is specified in TestCluster node settings

We rely on the `cluster.name` setting to be the same across all nodes
and transport clients etc. If a node setting contains `cluster.name`
the test might not work if a random transport client is swapped
in. Passing such a configuration should result in an exception since
it's clearly an illegal state.
Use different field names based on the data type in aggregations tests.

Tests fail once in a while because of a ClassCastException at the mvel level.
We suspect that this happens because a script that is JIT-ed on a specific
data type cannot later be used with another one, but we didn't manage to
reproduce in our development environments, so let's try to change the field
names to see if this error keeps occurring.
Re-Sort config/names
Removed old serialization logic (<= 1.0-RC1) in readFrom and writeTo methods.
Removed duplicated registration of warmers as custom metadata type

Already done in a static block within IndexMetaData
Removed put/delete warmer tests that were meant to test that the serialization was bw compatible after adding support for acks