gh-40983: Ensure _charpoly_df is interruptible, take 2
previously I added some `sig_check` to this function in
https://github.com/sagemath/sage/pull/39757 , but I didn't realize this
loop does an O(n^2) amount of work without `sig_check`. (for p in
range(t+1), for k in range(p))
or maybe I did realize but didn't think O(n^2) is a big deal,
considering the whole algorithm is O(n^4).
@tobiasdiez report a test failure in
https://github.com/sagemath/sage/issues/40715#issuecomment-3369069147 .
Hopefully this fixes it, or at least reduce its probability.
### :memo: Checklist
<!-- Put an `x` in all the boxes that apply. -->
- [ ] The title is concise and informative.
- [ ] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.
### :hourglass: Dependencies
<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - #12345: short description why this is a dependency -->
<!-- - #34567: ... -->
URL: https://github.com/sagemath/sage/pull/40983
Reported by: user202729
Reviewer(s): Travis Scrimshaw