[SPARK-1946] Submit tasks after (configured ratio) executors have been registered

Because submitting tasks and registering executors are asynchronous, in most situation, early stages' tasks run without preferred locality.

A simple solution is sleeping few seconds in application, so that executors have enough time to register.

The PR add 2 configuration properties to make TaskScheduler submit tasks after a few of executors have been registered. 

\# Submit tasks only after (registered executors / total executors) arrived the ratio, default value is 0 
spark.scheduler.minRegisteredExecutorsRatio = 0.8

\# Whatever minRegisteredExecutorsRatio is arrived, submit tasks after the maxRegisteredWaitingTime(millisecond), default value is 30000
spark.scheduler.maxRegisteredExecutorsWaitingTime = 5000
@kayousterhout The constant (default value of numExecutors) is not only defined in this class and  ApplicationMasterArguments. It is also defined in ClientArguments. 

Even I guess the below default values are from same consideration like numExecurots.
https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/SparkContext.scala#L1232
https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/SparkContext.scala#L1232
https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/SparkContext.scala#L1232

If we want to make the value to be constant, we should considerate all of them.
So maybe we can add an object org.apache.spark.Constants to manange all constants.
@tgravescs