FIX issue#8147 Recursion depth exceeded in as_int(Rational(0, 0))

update test_as_int in test_compatibility.py
rather than raise an error here -- after all, these are numbers -- why not just return x?

In as_int, however, a TypeError could be raised since none of these are integers.