Small code cleanup.

Removed non-exported prototypes from gd.h.  Where possible, made the
functions static and moved the rest of the prototypes to gd_intern.h.

Also removed redundant macros MIN/MAX macros from gd_interpolation.c
(since they're also defined in gd_intern.h) and tidied the formatting
a little.