[SPARK-4534][Core]JavaSparkContext create new constructor to support preferredNodeLocalityData with YARN

create new constructor to support preferredNodeLocalityData with YARN
example:
SparkConf sparkConf=new SparkConf();
Configuration conf = new Configuration();
List inputFormatInfoList =new ArrayList<InputFormatInfo>();
inputFormatInfoList.add(new InputFormatInfo(conf, org.apache.hadoop.mapred.TextInputFormat.class, path));
JavaSparkContext ctx=new JavaSparkContext(sparkConf,inputFormatInfoList);