[sgen] Fix cementing with concurrent M&S.

Cementing can happen during a concurrent collection when processing
the cardtable.  We use a separate cementing hash during concurrent
collections but we didn't pin objects from there.
[sgen] Fix build with heavy binary protocol.
[sgen] Implement a proper state machine for workers.

What we had previously was an impromptu state machine that was
badly implemented, hard to reason about, and not easily extensible.
[sgen] Remove `workers_marking` - workers are always marking.
[sgen] Stop concurrent worker during concurrent update and nursery collections.

The two collectors stepped on each other's toes.  Specifically, updating the mod union
card table while the worker thread might mark cards in the card table will not work.

The simplest solution for now is to stop the worker thread during concurrent updates
and nursery collections.  In the future we can have the thread help with the nursery
collection.
[sgen] Move heap checks before pinning.
[sgen] Add assertions.
[sgen] Optional check that the concurrent collector doesn't update references.
[sgen] Make `check-mark-bits` also scan nursery objects.
[sgen] When out of memory, finish concurrent with scanning whole nursery.  Fixes #23401.

If we run out of memory during the nursery collection in the finishing collection pause,
there will be late-pinned objects in the nursery: pinned objects that were not pinned
from conservative roots (or cementing).  We need to scan those, too, so in that case
we just walk the nursery and scan all objects.
[sgen] Add missing `volatile`.
[sgen] Binary protocol entry for pin stage.
[sgen] Only count cards for STW protocol if heavy is enabled.
[sgen] Scan the whole nursery in the finish mark pause.

Before we do all the major heap work in the finish mark pause of a
concurrent collection, we perform a nursery collection, for simplicity's
sake.

The nursery collection left pinned objects in the nursery, without
following their references into the major heap, so the major heap work
had to scan those objects again.  There was no special provisioning
for this—major mark would do the pinning again, and we would
automatically end up scanning the objects again.

The way we determine the stack end for the GC thread, however,
had the effect of making pinning non-deterministic.  We would
conservatively scan part of the GC thread's stack, which was
subject to change, to pinning again might result in less or more
objects pinned.

The proper solution would be to determine the stack end correctly,
but for now we will just the whole nursery.
[sgen] Make `check-mark-bits` work again.
[sgen] Reorganize `sgen_perform_collection` for clarity.
[sgen] Never mark from two threads at the same time.

We don't update mark bits atomically, so we can't have two threads
marking at the same time, which means we have to stop the concurrent
collector worker thread while we do work in the main GC thread.  That
includes nursery collections, because they also touch mark bits.

Also problematic are mod-union updates.  The worker threads can add
global remsets, which they do in the main cardtable.  This will conflict
with updating the mod-union table, so having the workers stopped also
applies there.
[sgen] Add a FIXME.
Merge pull request #1388 from schani/fix-23401

Fix 23401