Fix transposed cofactor bug.
Fix issue 4, estimating degrees better.

Note that, although we now handle a larger class of expressions,
preprocessing must still be applied prior to calling the degree
estimation algorithm for correct result in a generic case.
Algorithm should now fail with a clear message if unsupported types
are present in the expression.

Also removed the unused and somewhat strange estimate_max_polynomial_degree.
Merge branch 'martinal/fix-issue-4'