[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.