readPNG: fix for modern libpng

The previous version of this file made extensive use of direct access
to png_info struct members. This direct access was deprecated ca.
libpng 1.2, and the struct was made opaque in 1.4.

This replaces direct struct access with use of getter functions, which
are now the recommended method of accessing these values.

This also updates png_set_dither() to png_set_quantize(), as the
function is named in libpng 1.4+. (It was temporarily removed, as it
never actually dithered, then reinstated under a more descriptive
name.)