Increase test coverage for Polynomial.

This commit generalizes the ScalaCheck tests, making it easy to run
the tests for dense and sparse polynomials of any type A.

For now, we're testing Rational and Complex[Rational]. There seem to
be some issues which prevent BigDecimal from working, although in
principle it should work.