Benchmark problem fixed

Implemented private lazy val _degree: Int in PolyDense and PolySparse
Fixed issue with benchmark as a result of _degree incorrect
implementation
Tidied up Polynomial companion object methods
Use array-backed Sparse polynomials.

This refactors the PolySparse implementation to use 2 arrays rather than
a map. This gives a good performance bump for all operations.
Get rid of unnecessary allocations in PolyDense#*.

This was using Array.fill which allocates a thunk, and a builder.
Switching over to just using new Array & cfor has a nice bump in the
benchmarks for small polynomials (<= 4).
Add some documentation to the polynomial methods.
Fix PolySparse evaluation.

A few bugs here! Things are working correctly now.
Fix bug in PolySparse#foreachNonZero.

Aside from fixing what would likely be an IndexOutOfBoundsException,
this also removes the check to see if a coefficient is non-zero.
PolySparse's coeff array should never have a 0 in it. If it does, there
is a bug in the construction, not in foreachNonZero.
Remove type class instances from Term class.

All the type class instances have been moved out to the methods now. The
main victim has been toString, which now uses some rather ugly
heuristics to make pretty strings.
Semiring extends AdditiveMonoid.

This switches Semiring to extends AdditiveMonoid rather than
AdditiveSemigroup. This means that Semiring still subsumes Rig and Rng,
however adding in a zero makes it much more useful. The downside is a
loss of generality, but I can't think of any Semiring without a zero.
And if we didn't have a zero, we could always add one by lifing the type
into an Option.
Remove type class instances from PolySparse/Dense.
Add a more type class instances for Polynomial.

This adds type class instances for Semiring, Rig, Rng, Module, and
VectorSpace for Polynomial.
Minor fixes to Polynomial GCD.

The GCD for polynomials had weird behaviour. While technically correct,
saying that the GCD of (x^2 + 2x + 1) and (x - 1) is 4 isn't what I
expected. This was first fixed by returning the GCD as a monic, but then
we get 1 as the GCD 2 * (x^2 + 2x + 1) and 2. So now we first factor out
the GCD of the 2 polynomials, so the leading terms are coprime. Then we
find the GCD as a monic, then multiply by the factor we first pulled
out.
Coax PolynomialTest into passing again (ie. fix bugs).
Add Polynomial GCD tests.
Merge remote-tracking branch 'upstream/master' into topic/array-sparse-poly

Conflicts:
	core/src/main/scala/spire/math/Polynomial.scala
	core/src/main/scala/spire/math/poly/PolyDense.scala
	core/src/main/scala/spire/math/poly/PolySparse.scala
Merge pull request #153 from tixxit/topic/array-sparse-poly

Array-backed Sparse Polynomials, type class instances moved to methods, and some other minor updates