introduce gcd_pf_pow_pow: gcd helper to handle partially factored expressions.