put common functions in Nullroute::LDAP

I have some stuff in Cluenet::LDAP and UK::LDAP that ought to be shared,
not copypasted.