[SPARKR-108] Implement map-side reduction for reduceByKey().