SPARK-1767: Prefer HDFS-cached replicas when scheduling data-local tasks

This change reorders the replicas returned by
HadoopRDD#getPreferredLocations so that replicas cached by HDFS are at
the start of the list.  This requires Hadoop 2.5 or higher; previous
versions of Hadoop do not expose the information needed to determine
whether a replica is cached.
Since `TaskLocation` is an entirely private API I'd leave this out. This sets the expectation that user-defined RDD's can rely on our new tagging scheme, but we didn't make that a public API. Also what if we e.g. refactor or change the `TaskLocation` class.

I'd just say we expect it to return a string of hostnames. Or just leave it as is.

We can decide as a follow-up whether to expose `TaskLocation`... it might be a good idea to allow user defined RDDs to take advantage of this.