Update to fit a bit more into current ldapdb status

Well, half-way old, half-way new. This replaces the old `bind_as()` code with the new one, and backports connection closing for tests. This will allow you to merge my `bind_as()` update in okupy!