test/heapsampling.go: slow down allocation rate and reduce iterations
test/heapsampling.go: slow down allocation rate and reduce iterations

As far as I can tell, this test suffers from #52433. For some reason,
this seems to become more of a problem on the windows/386 than anywhere
else. This CL is an attempt at a mitigation by slowing down the
allocation rate by inserting runtime.Gosched call in the inner loop. It
also cuts the iteration count which should help too (as less memory is
allocated in total), but the main motivation is to make sure the test
doesn't take too long to run.

Fixes #49564.

Change-Id: I8cc622b06a69cdfa66f680a30e1ccf334eea2164
Reviewed-on: https://go-review.googlesource.com/c/go/+/408825
Reviewed-by: Bryan Mills <1c8aad60184261ccede67f5c63a0d2a3bf3c9ff4@google.com>
Run-TryBot: Michael Knyszek <4473450dc5c88f06e1fb787f303d7805ec2aee65@google.com>
TryBot-Result: Gopher Robot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>

golang/go,nawawi/go,nawawi/go,nawawi/go,nawawi/go,nawawi/go,golang/go,golang/go,nawawi/go,golang/go,golang/go,golang/go,golang/go,nawawi/go,nawawi/go,golang/go