[SPARK-3073] [PySpark] use external sort in sortBy() and sortByKey()

Using external sort to support sort large datasets in reduce stage.
As of my new PR, this will need to be changed to "SPARK_LOCAL_DIRS" (plural).