Math is as hard as Concurrency
fix test to use correct store setting
Fixed test taht relied on internal document ordering.

Lucene might internally tie-break on low level doc-Ids which
can change depending on merges etc. and test timings. No test should
rely on the actual order if scores are identical.
better handling of failures in transport to catch assertions
make sure we also catch assertions (well Throwable) in our transport layer and properly log or callback the exception handler in that case
better handling of failures in transport to catch assertions
move wrapping the stream into the try block, even though its unlikely they will throw a failure, better be safe...
Add a "score_mode" parameter to rescoring query.

Default value is "total", possible values are: "max", "min", "avg",
"multiply" and "total".

- "total": the final score of a document is the sum of the original
  query score with the rescore query score.
- "max": only the highest score count.
- "min": only the lowest score is kept (if the document doesn't match
  the rescore query, the original query score is used).
- "avg": average of both scores
- "multiply": product of both scores

Closes #3258
pass the codec to fix index
its not used in Lucene fix index implementation, but just in case, pass it because we can (tm).
Only check if ttl purger has deleted the docs when the delete count in indexing stats has been increased.
cleanup signatures file
enable sys out check + remove unused code
Don't allow unallocated indexes to be closed.

Closes #3313
fix transport support for versioning
when starting the request/response cycle, we should use the lowest version out of the current node version, and the target node version to serialize the request, and put it in the header. this will allow to support both backward and forward comp.
in addition, have Version as an injected value to different services, to make different versions more easily testable, compared to using Version#CURRENT
randomize ports on specific transport and disco tests
improve test
the test checks that even though some shards might not be active, search will still work
improve test to be more descriptive when it fails
don't use guava ordering sorted copy, since it does 2 copies (instead of 1)
simply use regular toArray and sort on it (we do need to copy it)
move char array caching to streams
wait till connection callback have executed on setup
remove RamUsage and use Lucene one
use BigDoubleList on all cases of geo point field data
same with other field data implementations, prefer to use the paged list compared to single long array in all cases