gh2666: terms_gcd does not remove and _keep_coeff doesn't hold 1.0

In addition, if only a 1 (or 1.0) is extracted, the original
expression is returned from terms_gcd rather than the polys-modified
form (e.g. 2.0*x + 3 instead of 2.0*x + 3.0).
keep 1.0 and -1.0 with _keep_coeff
Merge pull request #2689 from smichr/gh2666

gh2666: terms_gcd does not remove 1.0