lync: speed up autodiscover
Autodiscovery first tries HTTP and if it fails, switches to HTTPS. I've
seen a Lync deployment where LyncDiscoverInternal.domain.com wouldn't
answer on HTTP port (as if server's SYN-ACK reply were dropped by
a firewall along the way) and Sipe had to wait for the underlying TCP
socket to time out before successfully trying HTTPS. Consequently it
took tens of seconds to a minute to log in.
This change eliminates the long timeout by making both HTTP and HTTPS
requests in parallel, processing whichever reply comes first and
canceling the other. Login times are now comparable to the state before
Lync autodiscovery was introduced.
The parallel requests are allowed in [MS-OCDISCWS] 3.2.1.1 Discovery of
Autodiscover.