SPARK-2740: allow user to specify ascending and numPartitions for sortBy...

It should be more convenient if user can specify ascending and numPartitions when calling sortByKey.