Performance improvements to integral_basis().

The way in which Sympy expressions are converted to
PuiseuxXSeries is made more efficient. Additionally,
some intermediate steps in the integral basis
calculations are made slightly more efficient by
appropriate use of cacheing.

Unittests are implemented as well.