gdal_calc: convert data types earlier so output numbers don't get wrapped to the input data-type.

Includes a test