Add LDAP uri option and fix deficiencies

This pull request will add an LDAP uri option and maintaining the server and port options like suggested in pull request #11922.
The tls option will initiate a start_tls and if you want to use ldaps you can specify this in the uri.