net: synchronize instead of sleeping in TestDialParallelSpuriousConnection
net: synchronize instead of sleeping in TestDialParallelSpuriousConnection

The arbitrary sleep in this test is empirically not always long enough
on slower builders. However, we know the exact number of connections
that should be dialed: we can wait on that number in the dial hook
instead.

Fixes #34495

Change-Id: I538244ceb75a80271a724304b993309482bd5b41
Reviewed-on: https://go-review.googlesource.com/c/go/+/375694
Trust: Bryan Mills <1c8aad60184261ccede67f5c63a0d2a3bf3c9ff4@google.com>
Run-TryBot: Bryan Mills <1c8aad60184261ccede67f5c63a0d2a3bf3c9ff4@google.com>
Reviewed-by: Ian Lance Taylor <87e9c6d529889242b7e184afb632328636553ab4@golang.org>
TryBot-Result: Gopher Robot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>

nawawi/go,cloudflare/go,golang/go,CAFxX/go,golang/go,CAFxX/go,nawawi/go,CAFxX/go,nawawi/go,CAFxX/go,cloudflare/go,nawawi/go,golang/go,golang/go,golang/go,cloudflare/go,cloudflare/go,nawawi/go,golang/go,CAFxX/go,CAFxX/go,cloudflare/go,golang/go,nawawi/go,CAFxX/go,cloudflare/go,cloudflare/go,CAFxX/go,nawawi/go,cloudflare/go,golang/go,nawawi/go