[libpng17] Bookkeeping: Moved functions around (no changes). Moved transform

function definitions before the place where they are called so that
they can be masde static. Move the intrapixel functions and the
grayscale palette builder out of the png?tran.c files. The latter
isn't a transform function and is no longer used internally, and the
former MNG specific functions are better placed in pngread/pngwrite.c
[libpng17] Made transform implementation functions static. This makes the

internal functions called by png_do_{read|write}_transformations static.
On an x86-64 DLL build (Gentoo Linux) this reduces the size of the text
segment of the DLL by 1208 bytes, about 0.6%. It also simplifies
maintenance by removing the declarations from pngpriv.h and allowing
easier changes to the internal interfaces.
[libpng17] Handle zero-length PLTE chunk or NULL palette with png_error()

instead of png_chunk_report(), which by default issues a warning
rather than an error, leading to later reading from a NULL pointer
(png_ptr->palette) in png_do_expand_palette().
[libpng17] Imported from libpng-1.7.0beta24.tar
[libpng17] Bump version to 1.7.0beta25