[SPARK-3519] add distinct(n) to PySpark

Added missing rdd.distinct(numPartitions) and associated tests
It's better to put them into single test case, because each test cases will create a new jvm, which has some overhead. We should keep the number of test cases not increase too much.