SPARK-4214. With dynamic allocation, avoid outstanding requests for more...

... executors than pending tasks need.

WIP. Still need to add and fix tests.
This could become 0 if `spark.task.cpus` > `spark.executor.cores`, and you're dividing by this later.