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

Because creating TaskSetManager 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 DAGScheduler submit stage after a few of executors have been registered. 

\# submit stage only after successfully registered executors arrived the ratio, default value 0 in Standalone mode and 0.9 in Yarn mode
spark.scheduler.minRegisteredRatio = 0.8

\# whatever registered number is arrived, submit stage after the maxRegisteredWaitingTime(millisecond), default value 10000
spark.scheduler.maxRegisteredWaitingTime = 5000
I'm a bit on the fence about making the default 90%.  While I want it high on yarn I was originally thinking this would just be set by a cluster config (user level) and leave the default in Spark code as 0 for backwards compatibility. So its probably better to remove this and leave default 0 unless others disagree.