Livestatus.query() Retry on socket error

We add resilience to livestatus.query() by making
it retry once in case a socket error occurs.

We do this because it is relatively common that queries
are made at the exact same time as nagios reload is happening.

Fixes opinkerfi/adagios#312