util img: special trick in findOptimalRange to skip full blacks

Sometimes (non-rectangular) images get unknown values replaced by 0s.
That can be a lot of 0s, which completely mess up with the outliers computation.

Detect such a case, and then skip the 0s. This improves a lot the contrast for
instance on tiled images.