[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.
I was trying to make the next two lines fit on the same lines, but it doesn't actually look too bad breaking them into two lines each.