Reuse python-ldap filtering functions.

Instead of rewriting custom filtering rules, reuse those from python-ldap.

This removes the need for ``unicode()``, thus helping toward py3 compatibility.