status/custom_view: Fix broken livestatus query

This patch fixes an issue where custom_view cannot be
loaded because an extra linebreak is sent with the
livestatus query.

I am guessing shinken's implementation of livestatus
does not care about this.
status/custom_view now more testable

If livestatus queries fail, return 500 error

This should make unit testing of the view easier.