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
Adding support and management for pluggable alarm callbacks
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
Adding modular alarm callbacks. Adding templating to email alarm callback.
Lowering debug level of alert scanner thread

Adding helper method to plugin api to register initializers
Avast, ye dreaded Core class!
Vanish, filthy Radio class!
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