Fix #217: toHexString wrong for negative numbers.

For values in the normal range of Int (-2^31..2^31-1), the
result is the same as on the JVM, i.e., it is shown as though
the value had been wildly cast to an unsigned 32-bit integer.

For values outside the range, the result is an explicitly
signed representation. For example, "+fffffffe" or "-80000001".
Formatter's behavior for out-of-range integers and x, X, o.

Align Formatter's behavior for out-of-range integers (Byte,
Short and Int) to the behavior of Integer.toOctalString and
Integer.toHexString.
Merge pull request #240 from sjrd/fix-tohexstring

Fix #217: toHexString wrong for negative numbers.