Fix undefined behavior (left shift by 64 bits) in ScaledNumber::toString().

This bug is reported by UBSan.