Nicer range for value histogram of integer images.

When an ImageItem's data has an integer dtype, this patch ensures that
each bin of the LUT histogram contains the same number of integer
values, in order to avoid "spikes" in the histogram that are merely due
to some bins covering more integer values than others.

This commit needs testing (it was rebased from an old commit).
Merge remote-tracking branch 'anntzer/integer-image-histogram-range' into integer-image-histogram-range
ImageItem.getHistogram is more clever about constructing histograms:
  - integer dtype images now have integer-aligned bins, with bin number
    determined by a target value
  - step size is automatically chosen based on a target image size
  - bins and step arguments have default values 'auto'
Merge branch 'integer-image-histogram-range' into develop

ImageItem.getHistogram is more clever about constructing histograms:
  - integer dtype images now have integer-aligned bins, with bin number
    determined by a target value
  - step size is automatically chosen based on a target image size
  - bins and step arguments have default values 'auto'
fixed division by zero