rename class to conform with Tests suffix
no need doc action test to check count in before class
 - also, since we randomize client transports, no need for specific classes to test for it, we test different clients across all our tests
empty double/long values should return 0
to conform with all other implementations (non empty), they getValue when there is no value associated with a doc should be 0
remove sysout
Added scoring support to percolate api

Scoring support will allow the percolate matches to be sorted, or just assign a scores to percolate matches. Sorting by score can be very useful when millions of matching percolate queries are being returned.

The scoring support hooks in into the percolate query option and adds two new boolean options:
* `sort` - Whether to sort the matches based on the score. This will also include the score for each match. The `size` option is a required option when sorting percolate matches is enabled.
* `score` - Whether to compute the score and include it with each match. This will not sort the matches.

For both new options the `query` option needs to be specified, which is used to produce the scores. The `query` option is normally used to control which percolate queries are evaluated. In order to give meaning to these scores, the recently added `function_score` query in #3423 can be used to wrap the percolate query, this way the scores have meaning.

Closes #3506
remove check and test for more than one mapper per field
Fix some minor things in function score parser/builder

- remove default scale weight in builder
- make parameters object/double instead of string
- do not convert number to string and back again, parse double instead
- remove javadoc reference to test classes
- Set parameters in constructor instead of in method
Added index and type checks to MetaDataMappingService.CountDownListener

Closes #3507
Small protection against a high number of nodes in UpdateMappingTests.updateMappingConcurrently
Put Mappings CountDownListener validates cluster state version of incoming change confirmations.

Closes #3508
expose simplified field methods for custom scripts
also, add respective iter methods to the script values to be used in custom scripts
Added a timeout check to searchWhileCreatingIndex with cluster state dump on failure.
Add more information to asserts and assert on the result of refresh.
Correctly apply boosts in query string.

This applies boosts to phrase queries generated by query string queries
both in boolean and dismax mode.
Improve backwards compatibility handling for NGram / EdgeNGram analysis

The '"side" : "back"' parameter is not supported anymore on
EdgeNGramTokenizer if the mapping is created with 0.90.2 / Lucene 4.3
The 'EdgeNgramTokenFilter' handles this automatically wrapping the
'EdgeNgramTokenFilter' in a 'ReverseTokenFilter' yet with tokenizers this
optimization is not possible. This commit also add a more verbose error message
how to work around this limitation.

Closes #3489
Errors (like StackOverflow) can cause a search context to not be released
It will eventually time out (with the default 5 minutes timeout), but we should properly handle it, and also, properly propagate the failure.
closes #3513
Limit the number created threads for machines with large number of cores

For machines with lots of cores ie. >= 48 the number of threads
created by default might cause unecessary memory pressure on the system
and can even lead to OOM where the system is not able to create any
native threads anymore. This commit limits the number of available
CPUs on the system used for thread pool initialization to at most
24 cores.

Closes #3478
Added percolator improvements:
* The _percolator type now has always to _id field enabled (index=not_analyzed, store=no)
* During loading shard initialization the query ids are fetched from field data, before ids were fetched from stored values.
* Moved internal percolator query map storage from Text to HashedBytesRef based keys.
Use ClusterService#localNode instead of checking the cluster state.

The ClusterState can hold an 'invalid' local 'DiscoveryNode' during
node startup and rare race conditions can cause NPEs if an 'invalid'
'DiscoveryNode' is serialized.

Closes #3515
Moved the reduce logic to the percolator type.