tests: Use assertEqual instead of outdated assertEquals.
Reuse python-ldap filtering functions.

Also Py3 compatible.
Merge pull request #39 from rbarrois/fix_ldap_escape

Reuse python-ldap filtering functions.
Merge pull request #40 from rbarrois/modernize

tests: Use assertEqual instead of outdated assertEquals.