It might be cleaner to add a `sortByKey` in `OrderedRDDFunctions.scala` that takes an ordering. Then this could be a one line function:

    rdd.map(t => (t, null)).sortByKey.map({case (t, _) => t})