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

Added missing rdd.distinct(numPartitions) and associated tests
This should be fixed in master, I think you should merge with master.