return 504 when the graylog2 server node wasn't available

this leads to clean updating of the counters in the ui
give proper error messages for problems with conf file

use the application path as a root when trying to find the file
check for common problems, such as empty file, missing file, unreadable file

fixes #291
don't try to check for the config file in test mode

fixes #291
actually create a config file for selenium tests

cannot check for application.isTest because the application doesn't exist at that point.
chicken and egg problem :(

this is better because it actually tests the same code path at the same time.

fixes #291
XSS secure quickvalues. #288
Merge git://github.com/Graylog2/graylog2-web-interface into develop