Fix the obscure segfault.

I spent a while working out the problem, so here it is:

The cycle collector was calling destructors and freeing memory involved in
cycles as it went, rather than calling all destructors first and then
freeing all memory later.

This meant some of the destructors which were invoked could access and write to
the memory for other elements in the cycle which had just been freed.

We just so happened to get away with this undefined behaviour most of
the time, but when the size of the structure involved was less than 32
bytes (e.g. for a global data structure exactly when there are zero
global variables), this was writing to the memory of newly-added
elements to the already_freed data structure used in the algorithm,
subsequently causing the check to misbehave and running the destructor
of some structure twice.