Fix a very rare hang on sgen.
* sgen-gc.c (restart_threads_until_none_in_managed_allocator):
When suspending threads, if a given thread was suspended on
a gc unsafe point we restart it until it land on a safe zone.
Since we restart the thread, it might die before we get the chance
to suspend it again, we take this into account except when waiting
for acks. We mistakenly waited for the same number of acks of the
restart step. It could have been reduced if a thread died.
This bug is very very hard to hit as it only happens on linux,
requires that a thread on an unsafe point dies right after been
restarted and it must not be a managed thread as those must take
the GC lock while cleaning up.
This sums up to a mostly theoretical bug that someone might
have observed once in the wild. We're better fixing it now
since further optimization work might make it easier to hit.