Added support for authentication against Active Directory subdomains.

This patch enables authentication against specific AD subdomain extracted from
the username. E.g. for configured domain name "example.com" user "north\tom"
will be authenticated as "tom" against "north.example.com".

Testing done:
I have this running fine with multiple AD subdomains configured in my
organization.

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