Fix bugs in IntervalIndex.is_non_overlapping_monotonic
- [X] closes #17237
- [X] closes #16560
- [X] tests added / passed
- [X] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [X] whatsnew entry

I had to modify one of the existing tests, which used an `IntervalIndex` that was overlapping at endpoints but was assumed to be non-overlapping.  The test failed due to an intermediate check against `is_non_overlapping_monotonic`, which is now fixed and properly returns that the index in question is in fact overlapping.  The test was modified to use an index which is similar with `closed='both'` but non-overlapping.

Note that #16588 also fixes #16560, but the PR appears to have gone stale, as there hasn't been an update in over two months.  Both #17237 and #16560 involve making changes to the same block of code, so it seemed easiest to fix both simultaneously.  