Search for alternative java if JAVA_HOME is defined
improve error message for common elasticsearch discovery problems

guess default HTTP endpoint for elasticsearch and try to read config

* compare cluster.name
* check compatible version
* warn if no connection could be made

fixes #506

(cherry picked from commit 2db6a92a51b8efd620fbc26879f69dc2e6e40bce)

Conflicts:
	graylog2-server/src/main/java/org/graylog2/bindings/providers/IndexerProvider.java
	graylog2-server/src/main/java/org/graylog2/indexer/Indexer.java
	graylog2-server/src/test/java/org/graylog2/indexer/IndexerTest.java
Merge pull request #491 from tatref/JAVA_HOME-fix

Search for alternative java if JAVA_HOME is defined #488
do not write Activity for missing master all the time. fixes #423
Fix typo
Merge pull request #523 from tatref/JAVA_HOME-fix

Fix typo
Switch to DefaultFullHttpResponse for HTTP input
Set content-length header
Import the right class
Just set content-length, our version of netty is too old
add chunked transfer encoding for CSV export of search results

requests for text/csv now use proper chunked transfer encoding and scroll searches to avoid buffering large amounts of data in the heap

also fixes ArrayOutOfBoundsExceptions during export

fixes #330
fixes Graylog2/graylog2-web-interface#757
Merge branch '0.20' of github.com:Graylog2/graylog2-server into 0.20
Merge branch '0.20' of github.com:meltingice/graylog2-server into meltingice-0.20
avoid deprecated methods, optimize imports
be more explicit about Connection response header
make best effort to honor limit parameter when exporting to csv

due to the way scrolling works, we might overshoot the limit a little bit

issue #330
make elasticsearch error messages more clear

fixes #518
Merge branch '0.20'

Conflicts:
	graylog2-inputs/src/main/java/org/graylog2/inputs/gelf/http/GELFHttpHandler.java
	graylog2-server/src/main/java/org/graylog2/indexer/Indexer.java
	graylog2-server/src/main/java/org/graylog2/indexer/searches/Searches.java
	graylog2-server/src/main/java/org/graylog2/periodical/NodePingThread.java