Gcd fixes

fixes a memory leak when computing the gcd between a term and a non-term poly, as in:

ring r=0,(x,y),dp;
poly f=x2y2;
poly g=x2y2+xy;
poly p;
while(1) { p=gcd(f,g); } // -> memory usage grows linearly

introduces the gcd between polynomials with integer coefficients, as in:

ring s=integer,(x,y),dp;
poly f=4*(xy+x);
poly g=2*(xy+x);
gcd(f,g); // -> 2xy+2x

see Singular -> SW_Test_Default -> #1827 (22 Jul 14 11:14)