SI-7150 Replace scala.reflect.internal.WeakHashSet

Replaces scala.reflect.internal.WeakHashSet with a version that
* extends the mutable.Set trait
* doesn't leak WeakReferences
* is unit tested
SI-7149 Use a WeakHashSet for type uniqueness

Currently type uniqueness is done via a HashSet[Type], but
that means the Types live through an entire compile session, even
ones that are used once. The result is a huge amount of unnecessarily
retained memory. This commit uses a WeakHashSet instead so that Types
and their WeakReferences are cleaned up when no longer in use.
Modify perRunCaches to not leak WeakReferences

perRunCaches was using a HashMap of WeakReferences which meant it would
accumulate WeakReferences over time. This commit uses a WeakHashSet
instead so that the references are cleaned up.
Merge pull request #2605 from JamesIry/weak_hashset_uniques

SI-7149 Use a WeakHashSet for type uniqueness