SPARK-1939 Refactor takeSample method in RDD to use ScaSRS

Modified the takeSample method in RDD to use the ScaSRS sampling technique to improve performance. Added a private method that computes sampling rate > sample_size/total to ensure sufficient sample size with success rate >= 0.9999. Added a unit test for the private method to validate choice of sampling rate.
The logic needs some cleanup. I think you only need to check whether `num > maxSelected`. Otherwise, there is one corner case where `initialCount < Int.MaxValue` but `num > maxSelected`.