base: add WeakValueIdDict (#62831)
`WeakValueIdDict` is an identity-keyed (`===`/`objectid`) hash table
whose entries are weak in the values. It thus differs from the existing
WeakKeyDict in two points:
1. It's weak in values not keys
2. It's identity-key (like IdDict)
Primary intended use case is for the UnionAll deprecation to cache the
identity of minted TypeVars.
---------
Co-authored-by: Keno Fischer <Keno@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>