`ChunkSet` data-structure, implements a hash set of chunk-ids
Preliminary implementation, not optimized yet. Just a simple hash-set, with linear probing and tombstones for deletion. Allocation is backed by the block allocator, to avoid space+time overhead of malloc.
At the moment I'm using ChunkSet in assertions during CGC to check that the scope is being handled correctly (consider #137).
There may be other uses throughout the runtime system. Anywhere we are marking chunk descriptors for some reason, we could instead use a ChunkSet to avoid reserving space in the chunk descriptor. For example, we could eliminate the chunk->pinnedDuringCollection flag by maintaining a set of pinned chunks in LGC. The secondary advantage, as illustrated by #137, is that it is helpful to avoid modifying chunk descriptors, because this can be problematic for concurrency, especially when chunks are freed to the block allocator.
I'm opening this pull request mainly just to not forget about this. Switching to using ChunkSets more pervasively will require more thorough testing and optimization. It's not pressing, but it's something we should consider.