InternPool: prevent anon struct UAF bugs with type safety

Instead of using actual slices for InternPool.Key.AnonStructType, this
commit changes to use Slice types instead, which store a
long-lived index rather than a pointer.

This is a follow-up to 7ef1eb1c27754cb0349fdc10db1f02ff2dddd99b.
cb6201715aAndrew Kelley committed on 9/13/2023, 12:08:56 AMparent7e2b6b0
10 files changedLine totals unavailable