Correct logic around the use of LDAPS and StartTLS
As outlined in this issue, when using ldaps to connect to an ldap server starttls is used.
Add the DialLDAPS
function to be used in place of Dial
for all ldaps connections.
Modify Dial
so that StartTLS is always called and tlsConfig
always set.
This should ensure desired behaviour when connecting to ldap servers for both ldaps and starttls.