Livestatus: Fix invalid livestatus query crashes Icinga 2.

Fixes #5076