runtime: bound small object sweeping to 100 spans when allocating
runtime: bound small object sweeping to 100 spans when allocating

Currently, the small object sweeper will sweep until it finds a free
slot or there are no more spans of that size class to sweep. In dense
heaps, this can cause sweeping for a given size class to take
unbounded time, and gets worse with larger heaps.

This CL limits the small object sweeper to try at most 100 spans
before giving up and allocating a fresh span. Since it's already shown
that 100 spans are completely full at that point, the space overhead
of this fresh span is at most 1%.

This CL is based on an experimental CL by Austin Clements (CL 187817)
and is updated to be part of the mcentral implementation, gated by
go115NewMCentralImpl.

Updates #18155.

Change-Id: I37a72c2dcc61dd6f802d1d0eac3683e6642b6ef8
Reviewed-on: https://go-review.googlesource.com/c/go/+/229998
Run-TryBot: Michael Knyszek <4473450dc5c88f06e1fb787f303d7805ec2aee65@google.com>
Reviewed-by: Austin Clements <7ea35d812706d9213868749011af1ed4fa2f6aa0@google.com>

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