LargeWord.toIntX deal with conversion to signed int incorrectly. Fixes aliceml/aliceml#6.

This is caused by type conversions in the implementation of fromIntX in C++.
It converts the value passed to toIntX to an uint32_t. This is compared
to MIN/MAX int values by converting it to a signed long int. It then compares
as greater than the MAX int value. Fix is to cast to a int32_t before
comparing as a signed long int.
Add test for aliceml/aliceml#6 - signed comparison error in LargeWord.toIntX.