[SPARK-2082] stratified sampling in PairRDDFunctions that guarantees exact sample size

Implemented stratified sampling that guarantees exact sample size using ScaRSR with two passes over the RDD for sampling without replacement and three passes for sampling with replacement.
r1.resultMap(key) is equivalent to r1.resultMap.get(key).get, which removed the ability to check for null entries. So the gets here aren't superfluous. But I'll move some of the logic into helper functions in Result instead.