Close LDAP connections properly.

Implement the `close()` method in DatabaseWrapper so that the connection to LDAP is actually unbound and closed properly as necessary. This seems to fix issues with mockldap which tampakrap is working on supporting. It will be also necessary for the rebinding support I'm working on.