Longer examples are fine with me (for example, look at the doctests for sortByKey).

In most of the existing doctests, I added `sorted(...)` when collecting the output.  The motivation behind this was to allow me to run the test suite with different SparkContext settings (such as batch sizes) without causing spurious test failures.  We should probably do that here, too.

At some point, I may want to revisit the decision to add `sorted`, since it clutters up the examples somewhat.  This is a side-effect of the doctests acting as both documentation and the primary source of tests for PySpark.  If we extended the coverage of the existing UnitTest suite, then we could simplify the example tests.