Use segment ordinals as global ordinals if a segment contains all values for a field on a shard level.

Relates to #5854
Closes #5873
Don't create docCounts equal to maxOrd for the GlobalOrdinalsStringTermsAggregator.WithHash impl.

Relates #5873
Update setup repositories documentation

Update doc so
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/setup-repositories.html
example is going to 1.1 instead of 0.90
Fix typo
Version types `EXTERNAL` & `EXTERNAL_GTE` test for version equality in read operation & disallow them in the Update API

Separate version check logic for reads and writes for all version types, which allows different behavior in these cases.
Change `VersionType.EXTERNAL` & `VersionType.EXTERNAL_GTE` to behave the same as `VersionType.INTERNAL` for read operations.
The previous behavior was fit for writes but is useless in reads.

This commit also makes the usage of `EXTERNAL` & `EXTERNAL_GTE` in the update api raise a validation error as it make cause data to
be lost.

Closes #5663 , Closes #5661, Closes #5929
Disable dynamic scripting by default

Closes #5853
_cat/allocation to return no value for `disk.total` when not available (e.g. non data nodes) instead of `-1b`

Closes #5948
Make ordinals start at 0.

Our ordinals currently start at 1, like FieldCache did in older Lucene versions.
However, Lucene 4.2 changed it in order to make ordinals start at 0, using -1
as the ordinal for the missing value. We should switch to the same numbering as
Lucene for consistency. This also allows to remove some abstraction on top of
Lucene doc values.

Close #5871
Removed indices-status docs.

Related #4854
Raise node disconnected even if the transport is stopped
during the stop process, we raise network disconnect, so it is valid to raise then while we are in stop mode, and actually, we should not miss any events in such a case.
Typically, this is not a problem, since its during the normal shutdown process on the JVM, but when running a reused cluster within the JVM (like in our test infra with the shared cluster), we should properly raise those node disconnects
closes #5918
Upgrade to Guava 17
closes #5953
spelling
[DOCS] Fixed scripting example
[DOCS] Fixed get asciidoc missing section warning
[DOCS] Removed leftover indices status link
Move SortMode to org.elasticsearch.search and rename to MultiValueMode
Multi value handling in decay functions

Decay functions currently only use the first value in a field that contains
multiple values to compute the distance to the origin. Instead, it should
consider all distances if more values are in the field and then use
one of min/max/sum/avg which is defined by the user.

Relates to #3960
closes #5940
Added type, max, min, queueSize & keepAlive to _cat/thread_pool

Closes #5366
Upgrade to Lucene 4.8

Closes #5932
Removed spec and YAML tests for indices.status

Related #4854