gplazma: ldap: fix closed connection problem

This patch fixes the problem of CommunicationException due to externally
closed connections (e.g., by a firewall) and it introduces unit tests
for all public methods of the plugin.

Acked-by: Tigran
Target: master
Request: 2.7
Require-book: no
Require-notes: no