LPS-49545 Do not add extra brackets for LDAP search filters to avoid validation errors in some environments

Hi @marcellustavares,

@migue reviewed the ANTLR related part of my fix. I've tested his modifications and it seems that it's fine. Could you please review the LDAP related parts?

Thanks,
Vilmos