Guard against extracting a gcd for symbolic powers.

Fixes issue 4032: trigsimp() TypeError: symbolic boolean expression has no truth value
http://code.google.com/p/sympy/issues/detail?id=4032
Add test from issue 4032.
Add test for issue 3400
Add test for issue 2826
Merge pull request #2501 from skirpichev/3400-test

Add test for issue 3400
Merge pull request #2509 from srjoglekar246/motionparamdocs

Doc changes to functions.py
Merge pull request #2503 from skirpichev/2826-test

Add test for issue 2826
Merge pull request #2489 from jrioux/relational

Guard against extracting a gcd for symbolic powers.

Fixes issue 4032: trigsimp() TypeError: symbolic boolean expression has no truth value
http://code.google.com/p/sympy/issues/detail?id=4032
First push with basic functions
Added gradient, rectified mistake in scalar_potential
Added tests, temporary helpers
Added electrostatics file
Added electrostatics tests
Removed MovingRefFrame mentions from field_functions
Porting to new base-1