[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
I agree that those other constants could be defined in a better way -- but my understanding is that this case is more extreme, because if you defined numExecutors to be something other than 2 here, there would actually be a bug right, because the scheduler would be waiting for the wrong number of executors to start?

In any case, this PR doesn't need to fix all of the constants in the project, but any new constants added should be added properly.