Speed up string.format for integers.

library/string.format.m:
    We used to convert Mercury ints to strings by doing arithmetic on
    (arbitrary precision) integers. This diff changes things so we now
    compute only one one digit this way; the rest we compute using
    arithmetic on ints, not integers. In most cases, we should be able
    to avoid doing arithmetic on arbitrary-precision integers at all,
    but that is a more involved change.