net/http: fix flaky test
net/http: fix flaky test

Prevent idle transport on race condition.

Fixes issue 7847

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://codereview.appspot.com/96230044

Committer: Brad Fitzpatrick <ae9783c0b0efc69cd85ab025ddd17aa44cdc4aa5@golang.org>

d0f/go-zh,bryanxu/go-zh,bryanxu/go-zh,d0f/go-zh,webfd/go-zh,bryanxu/go-zh,d0f/go-zh,sanjosh/sanjos100-tipc,webfd/go-zh,webfd/go-zh,webfd/go-zh,sanjosh/sanjos100-tipc,sanjosh/sanjos100-tipc,bryanxu/go-zh,webfd/go-zh,bryanxu/go-zh,bryanxu/go-zh,d0f/go-zh,d0f/go-zh,webfd/go-zh,sanjosh/sanjos100-tipc,bryanxu/go-zh,sanjosh/sanjos100-tipc,d0f/go-zh,d0f/go-zh,bryanxu/go-zh,sanjosh/sanjos100-tipc,webfd/go-zh,sanjosh/sanjos100-tipc,d0f/go-zh,sanjosh/sanjos100-tipc,webfd/go-zh