gh-36940: new method "fraction" in integer-valued polynomials
This is adding a new useful method to this class.
Also fixing the h-polynomial method by adding a reversal there.
### :memo: Checklist
- [x] The title is concise, informative, and self-explanatory.
- [x] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [x] I have created tests covering the changes.
- [x] I have updated the documentation accordingly.
URL: https://github.com/sagemath/sage/pull/36940
Reported by: Frédéric Chapoton
Reviewer(s): Frédéric Chapoton, Travis Scrimshaw