Add `queries` to XContent output of PercolateStats

The queries stats tracked but not exposed to the Rest API

Closes #4440
Skipping execution of remaining Deciders if one of them returns a Decision.NO.

Reordering execution of the different AllocationDeciders, so the cheapest get executed first.
Add trace logging to AllocationDeciders if decision is NO()
Added the `force_source` option to highlighting that enforces to use of the _source even if there are stored fields.
The percolator uses this option to deal with the fact that the MemoryIndex doesn't support stored fields,
this is possible b/c the _source of the document being percolated is always present.

Closes #4348
Fixed test bug
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