Refactor incremental_sweep_phase() in gc.c