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

... executors than pending tasks need.

WIP. Still need to add and fix tests.
minor: add new line here + 1 line comment, something like
```
// Do not request more executors if we already have enough pending
```