Two callers were still using vector.resize(0) to drop accumulated
data: graph/serialize.hh's overflow tracking and hb_bit_set_t's
clear() (via its own internal resize()). resize(0) on a vector
in error state short-circuits without zeroing length, leaving
stale entries that downstream code then walks as if valid.
Fix both:
- serialize.hh: call overflows->clear() instead.
- hb-bit-set.hh: reimplement clear() to zero length/population
unconditionally by calling pages.clear() / page_map.clear()
directly, bypassing the internal resize() that bails when
`successful` is false.
Mirrors the March clear() fix in hb-vector.hh (commit d134f88824).
Assisted-by: Claude <noreply@anthropic.com>
Prior to this change the object id for a vertex in the repacker graph is it's position in the topological ordering. As a result after each sorting the object ids change. This decouples the topological sorting from the object id assignments. A separate ordering list is retained. This simplifies handling around object ids which no longer needs to account for them shifting, and improves performance by eliminating the step of reassigned link object ids after each sort.