[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
It would be simpler to just inline the following code. There is no valid performance argument for separating it.

```
(executorActor.size >= totalExecutors.get() * minRegisteredRatio)
```

Referencing the size of a HashMap in scala is a constant time operation. See

https://github.com/scala/scala/blob/v2.10.4/src/library/scala/collection/mutable/HashTable.scala#L48

`totalExecutors.get()` is also a constant time operation.

I don't see any performance argument for the current approach.