Issue #16453: Fix equality testing of dead weakref objects.
Also add tests for hashing.
3 files changed