Use gimp_parallel_distribute_area() to parallelize the histogram calculation, which seems to scale very well.