ENH: Allow different senses of "distance" for method=nearest indexing
#### Is your feature request related to a problem?

`Index.get_loc` with the method keyword has been quite useful for me, but I often find myself using data (e.g. atmospheric pressure levels) where the truest sense of the word 'nearest' is actually the closest value in log(p), not the normal number line. 

#### Describe the solution you'd like

My first thought was to simply request a "log_nearest" option to the method parameter, but I think it is easier to get much more functionality essentially "for free" with a different construction:

Index.get_loc (and subsequently Index._get_nearest_indexer) could accept a parameter (Let's call it "pre", but I think there are certainly better options I haven't thought of) which is a ufunc of one variable, and apply that to the target values and left and right indexed values before calculating their distances.

e.g.:


```python
>>> idx = pd.Index([10, 0.1, 0.01])
>>> idx.get_loc(2.0, method='nearest')
1
>>> idx.get_loc(2.0, method='nearest', pre=np.log)
0
```

#### API breaking implications

This should not affect any existing usages of the API

#### Describe alternatives you've considered

An alternative solution to my specific problem is to store the index in the log-space version, but this is considerably less human-readable in general.

#### Additional context

Besides changing the signatures and documentation, I believe this change can primarily be implemented with edits to this section of the indexing code

https://github.com/pandas-dev/pandas/blob/2cb96529396d93b46abab7bbc73a208e708c642e/pandas/core/indexes/base.py#L3269-L3277

There may also need to be some additional code added to the higher-up functions to produce errors if this parameter is passed when method != "nearest", as I don't believe it makes sense in that context.

It is also worth noting that this has the potential to fail (e.g, if a point in the indexer is 0 or negative, the log function will not work). Pandas may want to trap those errors and report them differently, but a garbage-in-garbage-out disclaimer may be helpful in general