don't set DNS_DISPATCHSTATE_CONNECTED until attaching handle
there was a race possible in which a dispatch was put into the 'connected' state before it had a TCP handle attached, which could cause an assertion failure in dns_dispatch_gettcp().
Closes #2963 (closed)