[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. 
Hmm I see - Ultimately the logical data distinction is an internal detail here right ? From the user's perspective its the max size of the output list, given an input list. Maybe we can call it `outputSize` ?