Remove LDAPSession.closed.
Move LDAPConfig initialisation to __init__.
Make LDAPConfig an attribute of LDAPSession.
Make config object explicit (not global).
Move global objects into main().
Move config from main() to LDAPSession.
Store ConfigParser object for global config.