Code refactoring: Class ColorHistogram updated and adjusted to new API
Make a few more thing configurable, fix support for histograms with large quantization.
Some begginning of support for perceptual distance metrics (i.e. quadratic) - untested.