http2: don't count aborted streams as active in tests

Deflake TestClientConnCloseAtBody, which assumes all streams
have been fully cleaned up after ClientConn.Close returns.
Only count active streams, not ones in the process of aborting.

Perhaps ClientConn.Close should block until all streams have
been cleaned up, although this could result in Close blocking
indefinitely if a stream is blocked reading from the request body.

Fixes golang/go#49335.

Change-Id: I172e0d3f10875191d29b24598de0abbdeb35e434
Reviewed-on: https://go-review.googlesource.com/c/net/+/361536
Trust: Damien Neil <dneil@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
diff --git a/http2/transport_test.go b/http2/transport_test.go
index 967edef..7ed4477 100644
--- a/http2/transport_test.go
+++ b/http2/transport_test.go
@@ -4418,9 +4418,17 @@
 }
 
 func activeStreams(cc *ClientConn) int {
+	count := 0
 	cc.mu.Lock()
 	defer cc.mu.Unlock()
-	return len(cc.streams)
+	for _, cs := range cc.streams {
+		select {
+		case <-cs.abort:
+		default:
+			count++
+		}
+	}
+	return count
 }
 
 type closeMode int