Fix inconsistent behaviour when LDAP server is broken

If the SASL bind fails the first address was handled correctly (451
Local error in processing: requested action aborted), while all
subsequent ones were not (550 Requested action failed: User not
found).

If the connection/bind fails ld needs to be reset, so that we try to
reconnect instead of reusing the bad LDAP object. I'm less certain
that a reset on query failure is necessary, but it shouldn't hurt.