Fix (2*a**(-2*x**2)) * (3*a**(2*x**2))

Fixes #50
Test for Integer directly
Also add a C++ test for this bug
Merge pull request #52 from certik/fix50

Fix (2*a**(-2*x**2)) * (3*a**(2*x**2))