Fixed bug in _integer_basis

    ``_integer_basis`` determines the scaling factor to put an algebraic
    equation in simpler form; a bug in it has been fixed in this PR.
    
    For example in the following example there is no scaling factor
    
    ```
    >>> from sympy.polys import Poly
    >>> from sympy.abc import x
    >>> Poly(x**5 - 40*x + 64, x, domain='ZZ').all_roots()[0]
    RootOf(x**5 - 40*x + 64, 0)
    ```
    
    while in master one gets scaling factor 2, and wrong roots.