Context manager for LDAPSession, incremental fixes to ldap_search. LDAPShell defined in main() (in the scope of LDAPSession object).