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