Fixed str() printing of Poly with non-atomic generators (#2754)

```
In [1]: str(Poly(2**(2*x), 2**x))
Out[1]: Poly((2**x)**2, 2**x, domain='ZZ')
```