Make wrapped C++ functions pickleable (#5580)
* Backport of https://github.com/google/pybind11clif/pull/30099
* Add back `PYBIND11_WARNING_DISABLE_CLANG("-Wcast-function-type-mismatch")`
macos-13 • brew install llvm
```
/Users/runner/work/pybind11/pybind11/include/pybind11/detail/function_record_pyobject.h:40:26: error: cast from 'PyObject *(*)(PyObject *, PyObject *, PyObject *)' (aka '_object *(*)(_object *, _object *, _object *)') to 'PyCFunction' (aka '_object *(*)(_object *, _object *)') converts to incompatible function type [-Werror,-Wcast-function-type-mismatch]
40 | = {{"__reduce_ex__", (PyCFunction) reduce_ex_impl, METH_VARARGS | METH_KEYWORDS, nullptr},
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
* Remove obsolete `PY_VERSION_HEX >= 0x03080000` (discovered by gh-henryiii)