Eliminated (undefined) signed integer overflow

clang ubsan warned running some of the 'EnSightBlow' tests:

IO/EnSight/vtkEnSight6BinaryReader.cxx:2823:15: runtime error: signed integer overflow: -1358823424 * 4 cannot be represented in type 'int'

I just upcast to 64 bit so that the multiplication doesn't overflow.
The tests now pass with the ubsan check.

I have subtly changed the behaviour here, but believe the
intent is preserved.

Change-Id: I0a35789c169204f04d2a683a029e992e9b20ca65
Initialize ivars to 0 to prevent access of uninitialized data

With -fsanitize=signed-integer-overflow, the test
'vtkIOXMLPython-TestEmptyXML' gives:

IO/XML/vtkXMLPStructuredDataReader.cxx:62:35: runtime error: signed integer overflow: 591396864 * -536868871 cannot be represented in type 'int'

The reason being that 'PointDimensions' was never set and so contained
random values that happened to be pretty big. There probably should
be some better error checking somewhere, but it seems a good
defence to zero these things anyway, in case a client of the class
(incorrectly) invokes a method that accesses the uninitialized data,
at least we'll get consistent results.

Change-Id: I77f5ac68d4edad632931667ddf5e87f930f48b3f
Changed computations to uint64 to prevent signed overflow

With clang's -fsanitize=signed-integer-overflow, the test
'vtkFiltersGeneralCxx-TestYoungsMaterialInterface' gives:

IO/Geometry/vtkAVSucdReader.cxx:302:34: runtime error: signed integer overflow: 16 * 504823808 cannot be represented in type 'int'
IO/Geometry/vtkAVSucdReader.cxx:302:60: runtime error: signed integer overflow: 4 * 2019295232 cannot be represented in type 'int'
IO/Geometry/vtkAVSucdReader.cxx:303:35: runtime error: signed integer overflow: 12 * -1340538880 cannot be represented in type 'int'
IO/Geometry/vtkAVSucdReader.cxx:313:35: runtime error: signed integer overflow: 369098752 * 2019295248 cannot be represented in type 'int'

This code tries to guess endianness, and when it's wrong it
ends up multiplying large numbers, resulting in signed overflow.
Fix is to do computations as uint64, which may still overflow,
but at least unsigned overflow is defined to wrap.

Did other misc cleanup too. Notably, the code could go into an
infinite loop trying big then little endianness over and over
again if a file is corrupt.

Change-Id: I2b7d84dae275386dcd87fa496b7916945284bc30
Eliminated (undefined) negation of INT_MIN

clang ubsan warned running vtkRenderingAnnotationCxx-TestCubeAxes2DMode:

Rendering/Annotation/vtkCubeAxesActor.cxx:1315:30: runtime error: negation of -2147483648 cannot be represented in type 'int'

This happens when 'range' is exactly 0.0, and so log10() gives -infinity,
which when cast to int (apparently) becomes INT_MIN which cannot
be negated due to the asymmetry of two's compliment representation.

Now, check log10() result with newly-created vtkMath::IsFinite API.
If the result is not finite, return 0 from vtkCubeAxesActor::Digits(),
which I'm not sure is the correct thing to return.

Change-Id: I36fc832df98ccb96c1fdc951c42e7e2c6de9d4b4
Merge topic 'sanitize-signed-integer-overflow' into master

38f76b82 Eliminated (undefined) negation of INT_MIN
07cd3906 Changed computations to uint64 to prevent signed overflow
743dc8aa Initialize ivars to 0 to prevent access of uninitialized data
e29cc816 Eliminated (undefined) signed integer overflow