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
gd.h now holds the canonical version number.

Up to now, the version numbers were defined in configure.ac and put
into gd.h by generating it from gd.h.in, replacing the values of
several C macros.  This violates the DRY principle, won't work on a
dumb build system, confuses some dev tools and is just a huge headache
in general.

This change makes gd.h (no longer generated) the home of the version
number and provides a script (config/getver.pl) which can extract the
requested version components from the header file.  configure.ac now
gets the version number from gd.h instead of vice versa.

In addition, there are now C functions that return the values of the
version macros.  This is for the benefit of non-C code using the
library without access to the header file.  It also provides a way to
get the version number of the library currently linked rather than the
header the program was compiled against.  (This could change if the
shared library is updated without recompiling the program using it.)
Test case for new version code.

This adds a simple test of the version API functions.
Updated Netware makefile

Makefile.netware (via an AWK script) used to pull the version numbers
from configure.ac.  Since they are no longer there, 'configure.ac' puts
them into 'configure' for Makefile.netware to find.  This change makes
it look there.

NOTE: This has not been tested on a Netware system.
Added new files to CMakeLists.txt.

Added new sources and tests to the relevant CMakeLists.txt files.

NOTE: This works for me but I am not a cmake expert.
Fixed a comment.

getver.pl comment referred to file src/version.h.  It should have
been src/gd.h.  This is now fixed.