changed internal rep of characteristic from int to long.

Some computations cannot handle such large characteristic, e.g.
factorization of polynomials.  These still need better error
messages when given inappropriate input