gh-36110: Update Cython to 3.0.2
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes #1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->
This PR builds on #36109 and contains the rest of changes needed to
update Cython to 3.0.0. The actual changes needed for building Sage are
a632238ca69a14869f941bc81df670a26e8e9acb for the code,
67ad2e4090e5c0d94beb6ec9f8c4454ab2677d66 for the build system, and
7195b8f31cd3b182fb78c7dc4c0c5235aab6d17b for the doctests. The rest of
commits are either from #36109 or for patching dependencies.
Closes #29863.
Ideally we should wait until numpy and scipy are upgraded to 1.25 and
1.11 respectively before merging this, so we can drop the patches for
them.
<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes #12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->
### :memo: Checklist
<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->
- [x] The title is concise, informative, and self-explanatory.
- [x] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
### :hourglass: Dependencies
<!-- List all open PRs that this PR logically depends on
- #12345: short description why this is a dependency
- #34567: ...
-->
- Depends on #36109
- Depends on #36112 (merged here)
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
URL: https://github.com/sagemath/sage/pull/36110
Reported by: Yutao Yuan
Reviewer(s): Gonzalo Tornaría, Kwankyu Lee, Matthias Köppe, Tobias Diez