[SPARK-2251] fix concurrency issues in random sampler (branch-1.0)

The following code is very likely to throw an exception:

~~~
val rdd = sc.parallelize(0 until 111, 10).sample(false, 0.1)
rdd.zip(rdd).count()
~~~

because the same random number generator is used in compute partitions. This fix doesn't change the type signature.

@pwendell

Author: Xiangrui Meng <meng@databricks.com>

Closes #1234 from mengxr/fix-sample-1.0 and squashes the following commits:

88795e2 [Xiangrui Meng] fix concurrency issues in random sampler