add simple_tls support for ldap and do some error refactoring

* simple_tls and start_tls now supported
* added logging so that when things break, it's not a mystery.