Post-process usernames from LDAP/AD before getting/creating User objects.

LDAP and AD usernames have basically no rules, while django usernames have lots
of rules. This change makes it so people log in using the username that they
normally have, but the username stored in Review Board will have all the junk
stripped out.

This fixes numerous issues that people have encountered, such as:
- Case insensitivity would cause multiple users to be created in Review Board
- Usernames with spaces or special characters would cause URL resolution and
  form validation failures, since the db backend didn't enforce the rules but
  our URL regexes and form fields did.

Testing done: Ran unit tests.

Fixes bugs 1478, 1674, 2924.

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