[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.
There isn't a immutable equivalent of `HashMap`. Also, using `mutable.Map` instead of `MMap` (short for mutable.Map) might push a couple lines over the 100 char limit.