Use offsetof() in io.c

This silences the following UBSan errors:

beam/io.c:7131:27: runtime error: member access within null pointer of type 'ErlDrvSysInfo'
beam/io.c:7140:20: runtime error: member access within null pointer of type 'ErlDrvSysInfo'
beam/io.c:7166:20: runtime error: member access within null pointer of type 'ErlDrvSysInfo'
beam/io.c:7174:20: runtime error: member access within null pointer of type 'ErlDrvSysInfo'
Properly handle SINT_MIN in small_to_big()

As there is no overflow for signed integers, -SINT_MIN is undefined behaviour
and the cast to unsigned needs to happen before negation. SINT_MIN denotes the
minimum value that can be stored in the Sint type.

beam/big.c:1512:6: runtime error: negation of -9223372036854775808 cannot be represented in type 'Sint' (aka 'long'); cast to an unsigned type to negate this value to itself