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
srm: Clean up srmPrepareToGet

Target: trunk
Require-notes: no
Require-book: no
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: http://rb.dcache.org/r/6136/