REGR: Fixed handling of Categorical in cython ops
Fixed by falling back to the wrapped Python version when the cython
version raises NotImplementedError.

Closes https://github.com/pandas-dev/pandas/issues/31450