Fix ForwardRef hash and equality checks (#704)

Ideally if we stick a ForwardRef in a dictionary we would like to reliably be able to get it out again.

https://bugs.python.org/issue37953
(cherry picked from commit e082e7c in python/cpython)

Co-authored-by: plokmijnuhby 39633434+plokmijnuhby@users.noreply.github.com
2 files changed