Sample the fits viewer's histogram calculation
Fitshistogram previously uses all samples in an image to caculate its
frequency statistics for histogram and statistics displays. This can
take a significant amount of time, and the precision is unnecessary.
With this change, image pixels are sampled when their frequencies are
computed, limited to under 2 million samples. This significantly
speeds up the capture of images when fitsviewer is displaying
statistics or histograms and there are millions of pixels in an image.
Reviewed By: mutlaqja
Tags: KDE Edu
Differential Revision: https://phabricator.kde.org/D23256