SPARK-1063 Add .sortBy(f) method on RDD

This never got merged from the apache/incubator-spark repo (which is now deleted) but there had been several rounds of code review on this PR there.

I think this is ready for merging.
Do we need to further discuss the way the parameter is passed or is the current method sufficient?  I'm not sure the implications for binary compatibility in the future if we switch between the two (context bound vs implicits).