bpo-33073: Rework int.as_integer_ratio() implementation (GH-9303)

* Simplify the C code.
* Simplify tests and make them more strict and robust.
* Add references in the documentation.
3 files changed