REGR: Fix to_csv with IntervalIndex
- [X] closes #28210
- [X] tests added / passed
- [X] passes `black pandas`
- [X] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [X] whatsnew entry

Thanks!