[SPARKR-144] Implement saveAsTextFile() in the RDD class.
Refactor RRDD code.
Merge remote-tracking branch 'SparkR_upstream/master' into saveAsTextFile
Merge pull request #118 from sun-rui/saveAsTextFile

[SPARKR-144] Implement saveAsTextFile() in the RDD class.
Merge branch 'master' of https://github.com/amplab-extras/SparkR-pkg into fix-sort-order
Fix saveAsTextFile test case