Bug 723213 - colors/levels/auto is broken for high bitdepth images

Port gimp_levels_config_stretch_channel() to histograms with
variable number of bins. Still behaves differently for different
bit depths tho.