[SPARKR-139] Fix slow take(): deserialize only up to necessary # of elements.

JIRA: [SPARKR-139](https://sparkr.atlassian.net/browse/SPARKR-139)

**Edit.** This PR only optimizes for the unserialized datasets, such as the ones returned directly from `textFile()`. The below description applies only to this case.

Previously, before trying to take as many elements as necessary from a partition, `take()` naively deserializes all elements in that partition at once. When an RDD has a giant partition and the number of elements to take is small -- which is the majority use case of this function -- this behavior results in driver getting OOM / being stuck forever. This patch changes the behavior so that only necessary number of elements will be examined & deserialized to the R side.

Tested on a ~70M textfile dataset with 2 partitions. Before this patch, taking 1 element results in OOM/stuck behavior; with this patch the operation finishes fairly quickly. 
I think we can add some internal variables if you think that'll make the code easier to read. For example, you can mark the size of rRaw (or res) as partitionSize or arraySize or something like that ?

At a high level this is the problem: Each element in the java list could produce one or more R elements. so we need to check the size of each java element and take only how much we need.   Actually instead of `lapply` we could also just use a `while` loop on the outside and that might make it easier