[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.
Since we already have a helper class for Result, we can make these lines simpler by adding some helper methods to Result. For example this could become something like:
```scala
r2.addMapping(key, entry1)
```