[SPARK-2862] histogram method fails on some choices of bucketCount

Both approaches should give reasonable results because the last one is skipped. The edge case is that both min and max are very very small values (customRange1 computes stepSize first):

~~~
scala> customRange(1e-322, 2e-322, 10)
res15: IndexedSeq[Double] = Vector(1.0E-322, 1.1E-322, 1.2E-322, 1.3E-322, 1.4E-322, 1.5E-322, 1.58E-322, 1.7E-322, 1.8E-322, 1.9E-322, 2.0E-322)

scala> customRange1(1e-322, 2e-322, 10)
res14: IndexedSeq[Double] = Vector(1.0E-322, 1.1E-322, 1.2E-322, 1.3E-322, 1.4E-322, 1.5E-322, 1.58E-322, 1.7E-322, 1.8E-322, 1.9E-322, 2.0E-322)

scala> customRange(1e-323, 2e-323, 10)
res12: IndexedSeq[Double] = Vector(1.0E-323, 1.0E-323, 1.0E-323, 1.5E-323, 1.5E-323, 1.5E-323, 1.5E-323, 1.5E-323, 2.0E-323, 2.0E-323, 2.0E-323)

scala> customRange1(1e-323, 2e-323, 10)
res13: IndexedSeq[Double] = Vector(1.0E-323, 1.0E-323, 1.0E-323, 1.0E-323, 1.0E-323, 1.0E-323, 1.0E-323, 1.0E-323, 1.0E-323, 1.0E-323, 2.0E-323)
~~~

I think we can ignore this edge case.