[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
[libpng17] Merged files with version 1.6.8 that have not changed since then.