polys: Fixed conversion problem in rational fields (#3921)

This is a backport of a0492d3baca522a73db58d5735bc846d5c3a7b44 commit
from new-polys branch (0.7.4). This is required to fix issue 3921
(slow tests in test_groebnertools.py failed due to invalid conversions
between integers and rationals when Python ground types were selected).
Merge pull request #2266 from mattpap/issue-3921

Fixed issue 3921 (0.7.3 release)