[libpng17] Merge with libpng-1.6.14beta07

Removed "option READ_COMPRESSED_TEXT enables READ_TEXT" from pnglibconf.dfa,
  to make it possible to configure a libpng that supports iCCP but not TEXT.
Removed "option WRITE_COMPRESSED_TEXT enables WRITE_TEXT" from pnglibconf.dfa
Only mark text chunks as written after successfully writing them.
[libpng17] Also don't mark text chunks as written in the end_ptr until written.
[libpng17] Minor editing of README and comments in example.c and pngtest.c.
[libpng17] Imported from libpng-1.7.0beta38.tar
[libpng17] Bump version to 1.7.0beta39
[libpng17] Revised INSTALL document.
[libpng17] Changed "if (!x)" to "if (x == 0)" and "if (x)" to "if (x !== 0)"
[libpng17] Merge pngtest.c with libpng-1.6.15beta01
[libpng17] Ported cosmetic changes from libpng-1.6.15beta02.
[libpng17] Imported from libpng-1.7.0beta39.tar
[libpng17] Bump version to 1.7.0beta40
[libpng17] Made a one-line revision to configure.ac to support ARM on aarch64

(bug report by Marcin Juszkiewicz, fix by John Bowler).
[libpng17] Simplified and future-proofed png_user_version_check().
[libpng17] Fixed GCC unsigned int->float warnings. Various versions of GCC

    seem to generate warnings when an unsigned value is implicitly
    converted to double. This is probably a GCC bug but this change
    avoids the issue by explicitly converting to (int) where safe.
  Free all allocated memory in pngimage. The file buffer cache was left
    allocated at the end of the program, harmless but it causes memory
    leak reports from clang.
  Fixed array size calculations to avoid warnings. At various points
    in the code the number of elements in an array is calculated using
    sizeof.  This generates a compile time constant of type (size_t) which
    is then typically assigned to an (unsigned int) or (int). Some versions
    of GCC on 64-bit systems warn about the apparent narrowing, even though
    the same compiler does apparently generate the correct, in-range,
    numeric constant.  This adds appropriate, safe, casts to make the
    warnings go away.
[libpng17] Imported from libpng-1.7.0beta40.tar
[libpng17] Bump version to 1.7.0beta41
[libpng17] Removed #ifdef PNG_16BIT_SUPPORTED/#endif around png_product2(); it is

    needed by png_reciprocal2().
Added #ifdef PNG_16BIT_SUPPORTED/#endif around png_log16bit() and
    png_do_swap().
[libpng17] Changed "#endif /* PNG_FEATURE_SUPPORTED */" to "#endif /* FEATURE */"
[libpng17] More "#endif" housecleaning, in *.h
[libpng17] Imported from libpng-1.7.0beta41.tar