fix: do not exit in is_standby()

Instead we now return an int with 0 meaning „not a standby,“ 1 meaning
„is a standby“ and -1 meaning „connection dropped“
fix: handle connection loss to standby

We do basically the same as we do for the master since connections drop
from time to time