Various `htable_t` fixes / improvements. (#61446)
Again inspired by LLVM DenseMap. AI (Claude) was used to assist with the refactor.
- Re-add the `count` heuristic with a separate `live` count to track
tombstone entries vs. live buckets
- Move `key` allocation / free into the `htable.inc` implementation
(no-op for `ptrhash`)
- Fix `strhash_remove` creating invalid empty slots rather than
tombstone entries
This seems to approximately ~double the performance of
`ptrhash_bp` in a GC heap snapshot.