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.
Minor, but `override val` on something that exports the same parameter is kinda weird, I think this could be cleaned up just slightly by making TaskLocation a trait instead with a `def host: String`. Then this still works and is the sole implementation.