LDAP: improve compilation of filters
LDAP: fix and extend tests