[SPARK-2774 - Set preferred locations for reduce tasks

Motivation for the change is in JIRA. There are a couple of things that I would like feedback about 

1. Should we sort the map outputs by size for every task -- This could be expensive if we have a large number of map outputs.

2. The number of preferred locations to use. Technically we could set this to a larger number, but I am not sure how it will affect the locality / delay scheduling in TaskSetManager.

cc @rxin