Pin correct names to wrapped Index comparison methods
State: closed

Currently:
```
>>> pd.Index.__eq__.__name__
'_evaluate_compare'
```

PR:
```
>>> pd.Index.__eq__.__name__
'__eq__'
```

Same for subclasses and other comparison methods.

On the side: use property decorator for `DatetimeIndex.freq` to avoid leaving `_get_freq` and `_set_freq` in the namespace.

- [ ] closes #xxxx
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry


Labels:
name: Compat
description: pandas objects compatability with Numpy or Python functions

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/18397?src=pr&el=h1) Report
> Merging [#18397](https://codecov.io/gh/pandas-dev/pandas/pull/18397?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/8d04dafd48d541042613548183b62288ef7e97b3?src=pr&el=desc) will **decrease** coverage by `0.02%`.
> The diff coverage is `94.44%`.

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

```diff
@@            Coverage Diff             @@
##           master   #18397      +/-   ##
==========================================
- Coverage   91.36%   91.34%   -0.03%     
==========================================
  Files         164      164              
  Lines       49721    49736      +15     
==========================================
+ Hits        45429    45432       +3     
- Misses       4292     4304      +12
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `89.14% <94.44%> (-0.01%)` | :arrow_down: |
| #single | `39.63% <88.88%> (-0.04%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/18397?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/indexes/datetimes.py](https://codecov.io/gh/pandas-dev/pandas/pull/18397?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9kYXRldGltZXMucHk=) | `95.49% <100%> (+0.01%)` | :arrow_up: |
| [pandas/core/indexes/category.py](https://codecov.io/gh/pandas-dev/pandas/pull/18397?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9jYXRlZ29yeS5weQ==) | `97.2% <100%> (ø)` | :arrow_up: |
| [pandas/core/indexes/timedeltas.py](https://codecov.io/gh/pandas-dev/pandas/pull/18397?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy90aW1lZGVsdGFzLnB5) | `91.17% <100%> (+0.03%)` | :arrow_up: |
| [pandas/core/indexes/period.py](https://codecov.io/gh/pandas-dev/pandas/pull/18397?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9wZXJpb2QucHk=) | `92.94% <100%> (+0.04%)` | :arrow_up: |
| [pandas/core/indexes/base.py](https://codecov.io/gh/pandas-dev/pandas/pull/18397?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9iYXNlLnB5) | `96.43% <33.33%> (ø)` | :arrow_up: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/18397?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `25% <0%> (-58.34%)` | :arrow_down: |
| [pandas/core/series.py](https://codecov.io/gh/pandas-dev/pandas/pull/18397?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc2VyaWVzLnB5) | `94.84% <0%> (-0.19%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/18397?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.8% <0%> (-0.1%)` | :arrow_down: |
| [pandas/core/internals.py](https://codecov.io/gh/pandas-dev/pandas/pull/18397?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW50ZXJuYWxzLnB5) | `94.47% <0%> (-0.08%)` | :arrow_down: |
| ... and [3 more](https://codecov.io/gh/pandas-dev/pandas/pull/18397?src=pr&el=tree-more) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/18397?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/18397?src=pr&el=footer). Last update [8d04daf...c36e870](https://codecov.io/gh/pandas-dev/pandas/pull/18397?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

I'm actually coming around to being more OK with the `set_function_name` pattern.  Writing a test that iterates over all classes in the pd namespace and all methods in those class namespaces.  Where would such a test belong?
for everything u can out in test_api
OK, I'll do that separately since a bunch of those fail at the moment, will need to be patched in a bunch of places.  This should be good-to-go on its own.
> shouldn't we define the _add_comparison_method to take a function and live in indexes/base? to avoid this repeated code?

I've got an implementation of roughly this.  Long story short: we're going to want to solve #18376 before trying to de-repeat this code.