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

Added missing rdd.distinct(numPartitions) and associated tests
thanks, i forgot to run lint. i've updated the patch...

$ ./dev/lint-python
PEP 8 checks passed.