Modernize the LDAP backend.
Review Request #2069 — Created Jan. 12, 2021 and submitted
This fixes up the LDAP backend to work correctly with Python 2 and 3. We now initialize LDAP with `bytes_mode=False`, which will ensure that `python-ldap` will use Unicode strings for all input and output on both Python 2 and 3. It's the rough equivalent of a `unicode_literals` import. That allows us to remove all the casting, which didn't work on Python 3 anyway without emitting warnings. Log output has been cleaned up, with some improved log output and a dedicated logger. The unit tests have been improved considerably. We now use spies to track calls, rather than overriding the `LDAPObject` with a per-test subclass. This allows us to ensure these overridden functions are actually called, which was just an assumption we made before. We didn't require LDAP support for development in the past, which meant that some tests recently regressed. It's now a development-time dependency. We also require a modern version for production. Testing Done: Unit tests pass for all versions of Python. Reviewed at https://reviews.reviewboard.org/r/11355/
TEST IS OONDE