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
Merge pull request #184 from pynag/feature-livestatus-retries-on-socket-error

Livestatus.query() Retry on socket error