This reworks the LDAP backend a bit to allow for mocking the ldap.Client interface. It also add a couple of unit test for the backend