BUG: fix MultiIndex.remove_unused_levels() when index contains NaNs
- [x] closes #18417
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry
