OF-830: Properly handle LDAP search filters

Updated LDAP components to escape special characters in user and group
search filters, including JID (un)escaping where appropriate.