Aggregations: Ordinals-based string bucketing support.

When the ValuesSource has ordinals, terms ordinals are used as a cache key to
bucket ordinals. This can make terms aggregations on String terms significantly
faster.

Close #4350
Relax a bit the accuracy tests on SloppyMaths.

Tests now ensure that the computed distance is correct within 1‰ instead of 1‱.
Don't try to run check-index in MockDirectoryWrapper

if the MockDirWrapper checks the index on close it closes all
closeables that is has to crash the index if something is not flushed yet.
For us this is a problem since the input is still used. We need to fix this in
lucene first.
More common AcknowledgedRestResponseActionListener

Introduced use of AcknowledgedRestResponseActionListener in put/delete index template
upgrade to Jackson 2.3.0
upgrade to latest jsr166
Enable incremental compilation using a workaround for the maven-compiler-plugin 3.1 bug
Resolve potential deadlock state during EsThreadPoolExecutor shutdown

Fixes #4334

The deadlock occurs between monitor object of EsThreadPoolExecutor and mainLock of ThreadPoolExecutor. The shutdown method of EsThreadPoolExecutor obtains the lock on monitor first and waits for mainLock of ThreadPoolExecutor in ThreadPoolExecutor#shutdown for part of the processing, while EsThreadPoolExecutor#terminated is executed under mainLock and tries to obtain monitor to notify listeners.
Update minimum_master_nodes comment to match documentation

Someone on the mailing list wrongly interpreted it to mean the current node is not included in the calculation.
Fix QuorumLocalGatewayTests#testChangeInitialShardsRecovery to start only one shard to not fulfill the quorum
wait until cluster-state is ready after startup
Increased timeout in ClusterServiceTests.testTimeoutUpdateTask to 100ms

The previous 2ms timeout was too small and caused a racing condition in timeout handling. This will be fixed but requires more work.
Cat API: Add endpoint to show aliases

This endpoint allows to check aliases, their indices, if a filter is
configured along with routing values for searching and indexing.

Closes #4414
Optimizes performance of AllocationDecider execution. Instead of using loops over all ShardRoutings, do accounting in RoutingNodes.
Speeds up recalculating cluster state on large clusters.
Improve RoutingNodes API

Currently the RoutingNodes API allows modification of it's internal state outside of the class.
This commit improves the APIs of `RoutingNode` and `RoutingNode` to change internal state
only within the classes itself.

Closes #4458
Reset source shards to `started` if canceling relocation.

Currently we miss to reset the source shards status to ACTIVE if we cancel
a relocation. If the shard is RELOCATING we need to reset to state ACTIVE.

Closes #4457
Make field data changes immediately taken into account and add the ability to disallow field data loading.

This commit changes field data configuration updates so that they are
immediately taken into account for loading new segments. The way it works
is that field data configuration is now cached separately from the field
data cache, meaning that it is now possible to clear the field data
configuration from IndexFieldDataService while the cache will stay around. On
the next time that Elasticsearch will reload field data configuration, it will
check if there is already a cache entry, and reuse it if it exists.

To disable field data loading, all that is required is to change the field
data format to "none" (supported by all field data types) using the update
mapping API. Elasticsearch will then refuse to load field data on any new
segment, but field data which has been loaded on the previous segments will
remain available. So you need to clear the field data cache in order to
reclaim memory (otherwise memory will be reclaimed slower, as segments get
merged).

Close #4430
Close #4431
Added new IndicesLifecycle.Listener method that allows to listen for any IndexShardState internal change.

Closes #4413
better cluster reroute allocation benchmark
Throw IAE if suggest results return differently sized results.

If the term suggester is used the results are merged depending on
the number of terms produced by the tokenizer / tokenfilter. If a
term suggester is executed across multiple indices that share the
same field but with different analysis chains we can't merge the
result anymore sicne tokens are our of order or have a different size.

This commit throws ESIllegalArgumentException if the number of entries
are not the same across all results.

Closes #3196