collectd-flush: Moved connection handling out of ‘flush()’.