Added code to restore the histogram after png down scaling.  Since down scaling
an image tends to compress the histogram of the resulting image it is
necessary to stretch the histogram back to its original width and
position following down scaling.

Added a number of tests to test_png.cpp.

A number of other fixes including restoring proper operation of
weighted estimation of image centroids.