Dont write pidfile twice on startup

There is no need to write the pidfile in the bin/elasticsearchshell script
as this happens already in the java code.

Also cleaning up the bin/elasticsearch shell script a bit (no need to return
an error code when exec is called, as this forks and exits the shell script
immediately).

Closes #3529
Closes #1745
Fix inconsistent usage of ScriptScoreFunction in FiltersFunctionScoreQuery

This commit fixes inconsistencies in `function_score` and `filters_function_score`
using scripts, see issue #3464

The method 'ScoreFunction.factor(docId)' is removed completely, since the name
suggests that this method actually computes a factor which was not the case.
Multiplying the computed score is now handled by 'FiltersFunctionScoreQuery'
and 'FunctionScoreQuery' and not implicitely performed in
'ScoreFunction.factor(docId, subQueryScore)' as was the case for 'BoostScoreFunction'
and 'DecayScoreFunctions'.

This commit also fixes the explain function for FiltersFunctionScoreQuery. Here,
the influence of the maxBoost was never printed. Furthermore, the queryBoost was
printed as beeing multiplied to the filter score.

Closes #3464
add boost_mode to rest interface

allow user to set combine functions explicitely via boost_mode variable.
make mult default boost mode

always multiply query score to function score. For script score
functions, this means that boost_mode has to be set to `plain` if
'function_score' should behave like 'custom_score'
format code
make GeoPoint parsable in lat/lon json format
add more combine functions and rename PLAIN to REPLACE
rename 'total' to 'sum', both enum and for query
Add offset to decay function score

Docs within the offset will be scored with 1.0, decay only starts after
offset is reached.
rename scale_weight -> decay
rename reference -> origin
format code
add builders for nicer java api

This commit and the previous 10 commits close issue 3533.

Closes #3533
add additional method for setting combine mode with CombineFunction parameter
Randomize numeric types in MLT test and apply mapping ahead of time.
Add ESAbortPolicy to cached pools

All ES ThreadPools / Executors should use the ESAbortPolicy or at least
one that throws the ESRejectedExecutionException.
Introduce base test classes to share thread scope annotations

Currently we run unittests with clusters running in the background
that can potentiallly spawn threads causeing the thread leak control
to fire off in tests that don't use the test cluster. This commit
introduces some base classes for that purpose shadowning lucene test
framework classes adding the approriate ThreadScope.
Wait for consistent view on both clients in ClusterServiceTests
Improve assertion and busy waiting for RecoveryWhileUnterLoadTests
Use awaiBusy rather than a tight loop in IndicesStoreTests