[SPARK-3250] Implement Gap Sampling optimization for random sampling

More efficient sampling, based on Gap Sampling optimization:
http://erikerlandson.github.io/blog/2014/09/11/faster-random-samples-with-gap-sampling/

`newDefaultRNG` or `createDefaultRNG` may be better. When I read the code `RandomSampler.rngDefault` in other places, I'm not sure whether this returns the same instance for all calls.