Exit if configure fails
Fix undefined behavior in NumberUtils.cfh

Shifting by more bits than the size of the data type is undefined.
Detected by clang's -fsanitize=undefined.
Fix signed integer overflow in TestUtils.c

Detected by clang's -fsanitize=undefined.