Add better LDAP connection handling
Zendesk issue: https://gitlab.zendesk.com/agent/tickets/13591 (But many more customer LDAP issues would be helped with this)
It would be nice to have some connection handling so if the first query times out or is otherwise unsuccessful we build a new adapter and try again.
It would also be nice if we make sure that the DNS is re-queried. In many corporations they advertise more than one IP on the LDAP name so if one has failed we should do another lookup and use another. This might happen transparently when we re-establish a connection but we should see for certain.
Customer also requests some form of connection pooling. I'm adding a note here, but not sure if we will want/be able to implement this now. If it requires another issue, we can make one.
Related to gitlab-org/gitlab-ce!2267 which adds a query timeout. Related to #139 (closed) which requests LDAP failover. This is a bit different approach because #139 (closed) is actually requesting a configurable failover/secondary server config key.