Change IntervalIndex set-ops error code type
- [x] xref #19021
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

Set operations (union, difference...) on ``IntervalIndex`` with incompatible index types will now raise a ``TypeError`` rather than a ``ValueError``.

This PR is needed to make the changes requested in #19021.

EDIT: I've improved the error message also. Previously, you'd get:

```python
>>> pd.IntervalIndex.from_breaks([0,1,2,3]).union(pd.RangeIndex(3))
ValueError: can only do set operations between two IntervalIndex objects that are closed on the same side
```

Which made no sense in this case. Now we get:

```python
>>> pd.IntervalIndex.from_breaks([0,1,2,3]).union(pd.RangeIndex(3))
TypeError: the other index needs to be an IntervalIndex too, but was type RangeIndex
```
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19329?src=pr&el=h1) Report
> Merging [#19329](https://codecov.io/gh/pandas-dev/pandas/pull/19329?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/1245f0673074316b53d1d1ee10abd6077058b133?src=pr&el=desc) will **increase** coverage by `<.01%`.
> The diff coverage is `100%`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/19329/graphs/tree.svg?token=eZ4WkYLtcO&src=pr&height=150&width=650)](https://codecov.io/gh/pandas-dev/pandas/pull/19329?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #19329      +/-   ##
==========================================
+ Coverage   91.53%   91.53%   +<.01%     
==========================================
  Files         150      150              
  Lines       48739    48741       +2     
==========================================
+ Hits        44612    44614       +2     
  Misses       4127     4127
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `89.9% <100%> (ø)` | :arrow_up: |
| #single | `41.72% <0%> (-0.01%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/19329?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/indexes/interval.py](https://codecov.io/gh/pandas-dev/pandas/pull/19329/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9pbnRlcnZhbC5weQ==) | `92.4% <100%> (+0.02%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19329?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19329?src=pr&el=footer). Last update [1245f06...c75e6de](https://codecov.io/gh/pandas-dev/pandas/pull/19329?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
 thanks @topper-123 

can rebase #19021 and tests should be much simpler. ping when ready on that one.