More speedups for Period comparisons
Following #21582, the biggest avoidable overheads in Period comparisons are in a) `isinstance` calls that can be short-circuited and b) `__ne__` call overhead.  This PR moves `__eq__` and `__ne__` to the cython file, removing the `__ne__` overhead, and changes an `isinstance` check to a try/except.

Using the same profile code from #21582, this brings the `set_index` runtime from 6.603 seconds down to 2.165 seconds.
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/21606?src=pr&el=h1) Report
> Merging [#21606](https://codecov.io/gh/pandas-dev/pandas/pull/21606?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/36422a88474396148bd7d5d38aa238ea844d9555?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `100%`.

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

```diff
@@            Coverage Diff             @@
##           master   #21606      +/-   ##
==========================================
- Coverage    91.9%   91.89%   -0.01%     
==========================================
  Files         154      154              
  Lines       49562    49543      -19     
==========================================
- Hits        45549    45530      -19     
  Misses       4013     4013
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.29% <100%> (-0.01%)` | :arrow_down: |
| #single | `41.84% <100%> (-0.02%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/21606?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/tseries/offsets.py](https://codecov.io/gh/pandas-dev/pandas/pull/21606/diff?src=pr&el=tree#diff-cGFuZGFzL3RzZXJpZXMvb2Zmc2V0cy5weQ==) | `97.11% <100%> (-0.05%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/21606?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/21606?src=pr&el=footer). Last update [36422a8...92e6fdd](https://codecov.io/gh/pandas-dev/pandas/pull/21606?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
 thanks @jbrockmendel !