BUG: added support for ordered categoricals in kendall/spearman correlation
- [x] closes #60306
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [x] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [x] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

This adds support for Kendall and Spearman correlation on **ordered** categorical data - no change in behaviour for Pearson correlation or for unordered categoricals.

As shown in the bug report
```python
df = DataFrame({'a' : [1, 2, 3, 4], 'b' : [4, 3, 2, 1]})
df['b'] = df['b'].astype('category').cat.set_categories([4, 3, 2, 1], ordered=True)
df.corr(method='spearman')
```
used to return -1, going forward this will return 1. I.e. this does not try to convert the categories to floats, but instead uses the stated order of each category. 


Tests used to pass - freethreading started segfaulting after I changed the .rst file - Highly doubt this is a problem with the PR This pull request is stale because it has been open for thirty days with no activity. Please [update](https://pandas.pydata.org/pandas-docs/stable/development/contributing.html#updating-your-pull-request) and respond to this comment if you're still interested in working on this. Let me know if there's anything I can do to improve this - the failing tests seem to fail at the build stage, or anyway before any actual test is run. Thanks for the pull request, but it appears to have gone stale. If interested in continuing, please merge in the main branch, address any review comments and/or failing tests, and we can reopen.