[3.13] gh-153200: Fix math.isqrt() for int subclasses with overridden comparison operators (GH-153203) (GH-153225) (GH-153226)
The final check-and-correct comparison in the arbitrary precision path
could call a comparison operator overridden in an int subclass.
Compare by value with int's tp_richcompare.
(cherry picked from commit
3a1b5473f217fc493f743c9ca8b877d2e76f8e6b)
(cherry picked from commit
a9a91d06a0e1faad9a56d4e652e4a7a98033adf8)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>