net: deflake TestAcceptTimeout
net: deflake TestAcceptTimeout

This change makes use of synchronization primitive instead of
context-based canceling not to depend on defer execution scheduling.

Fixes #17927.

Change-Id: I5ca9287a48bb5cdda6845a7f12757f95175c5db8
Reviewed-on: https://go-review.googlesource.com/33257
Reviewed-by: Ian Lance Taylor <87e9c6d529889242b7e184afb632328636553ab4@golang.org>

CAFxX/go,christopher-henderson/Go,linux-on-ibm-z/go,linux-on-ibm-z/go,josharian/go,nawawi/go,golang/go,Cofyc/go,codestation/go,goodlang/good,CAFxX/go,derekmarcotte/go,cloudflare/go,cloudflare/go,suncycheng/go,polyverse-security/go,CAFxX/go,golang/go,vsekhar/elastic-go,derekmarcotte/go,polyverse-security/go,goodlang/good,codestation/go,suncycheng/go,josharian/go,golang/go,nawawi/go,linux-on-ibm-z/go,nawawi/go,goodlang/good,suncycheng/go,josharian/go,linux-on-ibm-z/go,goodlang/good,codestation/go,suncycheng/go,akutz/go,goodlang/good,akutz/go,CAFxX/go,cloudflare/go,josharian/go,Cofyc/go,ImJasonH/go,polyverse-security/go,codestation/go,nawawi/go,akutz/go,derekmarcotte/go,cloudflare/go,derekmarcotte/go,josharian/go,akutz/go,Cofyc/go,Cofyc/go,ImJasonH/go,ImJasonH/go,codestation/go,linux-on-ibm-z/go,vsekhar/elastic-go,cloudflare/go,josharian/go,suncycheng/go,nawawi/go,ImJasonH/go,josharian/go,vsekhar/elastic-go,ImJasonH/go,akutz/go,golang/go,golang/go,golang/go,codestation/go,suncycheng/go,derekmarcotte/go,akutz/go,golang/go,vsekhar/elastic-go,vsekhar/elastic-go,akutz/go,golang/go,goodlang/good,Cofyc/go,ImJasonH/go,nawawi/go,polyverse-security/go,cloudflare/go,suncycheng/go,polyverse-security/go,vsekhar/elastic-go,polyverse-security/go,cloudflare/go,akutz/go,vsekhar/elastic-go,codestation/go,derekmarcotte/go,Cofyc/go,goodlang/good,CAFxX/go,josharian/go,CAFxX/go,polyverse-security/go,Cofyc/go,linux-on-ibm-z/go,nawawi/go,codestation/go,ImJasonH/go,polyverse-security/go,cloudflare/go,linux-on-ibm-z/go,suncycheng/go,nawawi/go,CAFxX/go,Cofyc/go,ImJasonH/go,vsekhar/elastic-go,CAFxX/go,derekmarcotte/go,derekmarcotte/go,goodlang/good,linux-on-ibm-z/go