PERF: use python int in RangeIndex.get_loc
Follow-up to #26565. I didn't ensure a python int in ``RangeIndex.get_loc`` in the original PR, causing a slow performance when using a key with a wrong type:

```python
In [1]: rng =  pd.RangeIndex(1_000_000)
In [2]: %timeit rng.get_loc(np.int64(900_000))
156 ms ± 1.03 ms per loop  # master
478 ns ± 6.3 ns per loop # this PR
```

Also some cleanups in ``__getitem__``.