[SPARK-1170] Add histogram method to Python's RDD API

Tested and ready to merge.
@davies This part of the code is taken straight from Scala. I will investigate and get back to you.