Added rehashing of id hash maps.

As a part of this added general infrastructure for fixups during gc.

[Finishes #55565916]