[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.
Do not import a class under `mutable` if there is one with the same name under `immutable`. Instead, import `scala.collection.mutable` and reference `Map` and `HashMap` as `mutable.Map` and `mutable.HashMap` in the code. Importing `mutable.ArrayBuffer` is fine.