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

I thought the order of operations would be important to get the result, so wrote it that way on purpose, but, it's actually fine this way too. I think the win here is not repeatedly adding 1/steps alone.