Class WeakKey

Implement a WeakReference key to be used in a collection. Being a WeakReference, it will not
prevent the key from being Garbage Collected. The key can only be created with a reference queue
so that users of this class provide cleanup logic which uses the items in the reference queue to
cleanup entries in the collection.
Note that the ReferenceQueue will contain the WeakKey instance that assocaited with the
referent that was GC'd. So, the elements on the ReferenceQueue can be used to directly access
and remove entries in the collection it is a key for. For example, one could do something
like the following in cleanup logic:
Object gcKey = null;
while ((gcKey = q.poll()) != null) {
WeakKey wk = (WeakKey) gcKey;
removedEntry = collection.remove(wk);
...
}