Higher precision in scaling.

Scaling (i.e. _gdScaleOneAxis()) used to accumulate the weighted
samples in unsigned char variables.  This truncated the floating-point
result toward zero, leading to a darker image and quantization of
colour gradients.

This change switches to keeping the values in doubles and only
coverting the final sums to unsigned char.  In addition to producing a
better result, it is also about 10-15% faster.

The conversion uses a couple of casts for speed.  The behaviour is
defined by ANSI but only correct on computers using twos-complement
arithmetic.  As such, this may break on obscure microcontrollers or
1960's-era minicomputers.
Added test case to exercise all of the gdImageScale() modes.

Creates and shrinks a bunch of images using gdImageScale(), once per
mode in both palette and truecolor.  It does not use GD_DEFAULT (which
is equivalent to one of the others) or GD_WEIGHTED4 (unsupported for
scaling).

Note that this test does not check if the resulting image looks anything
like the source.
Fix for Issue #97: segfaults when scaling a non-truecolor image

gdImageScaleTwoPass() now converts palette sources to truecolor before
scaling.  This is consistent with the behaviour of the other scale
functions.
Merged in suetanvil/gd-libgd/interp-precision (pull request #15)

Higher precision in scaling.
Merged in suetanvil/gd-libgd/scale-palette-image-bug (pull request #16)

Fix for #97