BUG: use hash-function which takes nans correctly into account for ExtensionDtype
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them


`pandas/tests/arrays/sparse/test_dtype.py test_hash_equal` fails on Python3.10 (see #41940). This is due to the fact, that since Python3.10 different nan-objects have different hashes.

In #41988 a hash function with the old pre-Python3.10 behavior was introduced. This function is used in ExtensionDtype to keep the correct behavior also with Python3.10.
