Regression in offsets caused offsets to be no longer hashable
- [x] closes #37267
- [x] tests added / passed Not quite sure, if these test is sufficient, if yes, I would tests for other functions.
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry
