Reworked numerical datatypes.

XiReal is now a generic class with a type parameter representing what
is being wrapped, e.g. Integer, Double, BigInteger.