Fix UnicodeDecodeError while LDAP-authenticating when user dn contains non-ascii symbols

Some logging statements would fail because we were trying to format a
bytestring. This change adds code to decode bytes that we get from LDAP into
unicode strings before logging.

This also fixes a bunch of logging statements to use the built-in formatter,
and pass exc_info=1 to all calls that are formatting an exception.

Reviewed at https://reviews.reviewboard.org/r/5751/