API/TST: make hasnans always return python booleans
- [x] xref #23294
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

``Index.hasnans`` currently returns either a python or a numpy boolean, depending on circumstances. This PR ensures that only python booleans ae returned and makes the tests for hasnans stricter.
