DIRSTUDIO-1039: close connection only instead of unbind before, added test for DirectoryApiConnectionWrapper