sync: add Pool benchmarks to stress STW and reuse
sync: add Pool benchmarks to stress STW and reuse

This adds two benchmarks that will highlight two problems in Pool that
we're about to address.

The first benchmark measures the impact of large Pools on GC STW time.
Currently, STW time is O(# of items in Pools), and this benchmark
demonstrates 70µs STW times.

The second benchmark measures the impact of fully clearing all Pools
on each GC. Typically this is a problem in heavily-loaded systems
because it causes a spike in allocation. This benchmark stresses this
by simulating an expensive "New" function, so the cost of creating new
objects is reflected in the ns/op of the benchmark.

For #22950, #22331.

Change-Id: I0c8853190d23144026fa11837b6bf42adc461722
Reviewed-on: https://go-review.googlesource.com/c/go/+/166959
Run-TryBot: Austin Clements <7ea35d812706d9213868749011af1ed4fa2f6aa0@google.com>
TryBot-Result: Gobot Gobot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>
Reviewed-by: David Chase <ae171625adc8645b8b79b7e405a6da5aba5341e0@google.com>

golang/go,CAFxX/go,CAFxX/go,golang/go,akutz/go,nawawi/go,CAFxX/go,akutz/go,josharian/go,nawawi/go,josharian/go,cloudflare/go,akutz/go,nawawi/go,cloudflare/go,nawawi/go,CAFxX/go,nawawi/go,CAFxX/go,cloudflare/go,nawawi/go,akutz/go,golang/go,CAFxX/go,nawawi/go,josharian/go,akutz/go,golang/go,cloudflare/go,josharian/go,josharian/go,akutz/go,golang/go,josharian/go,cloudflare/go,akutz/go,golang/go,golang/go,cloudflare/go,golang/go,josharian/go,CAFxX/go,josharian/go,cloudflare/go,cloudflare/go,CAFxX/go,nawawi/go,akutz/go