Fix ((x**3+x**2+x)**2).expand() and add a test

Fixes #51.
Add an assert statement into the expansion

That way if it can happen that the terms combine, we'll know.
Merge pull request #53 from certik/fix51

Fix ((x**3+x**2+x)**2).expand() and add a test