De-duplicate user search in LDAP

Move identical user search after the anonymous and service account binds for
better readability and maintainability. Also clean up a couple comments.

Testing Done:
Same test routines I ran for /r/5203

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