LDAP: improve compilation of filters
Merge pull request #7284 from owncloud/ldap_filter_compilation

LDAP: improve compilation of filters