SPARK-1170-pyspark-histogram: added histogram method, added max and min to statscounter

Here's an implementation of histogram which relies on a small change to statscounter and returns a defaultdict of tuples.