Use an alarm for LDAP check to ensure it times out

Net::LDAP->new doesn't always timeout.
for instance ldirectord checks would stall and fail to detect a stopped slapd
server (stopped with pkill -SIGSTOP slapd)
Merge pull request #318 from llaurent/ldap_timeout

also using an alarm for the timeout check