[SPARK-3795] Heuristics for dynamically scaling executors

This is part of a bigger effort to provide elastic scaling of executors within a Spark application ([SPARK-3174](https://issues.apache.org/jira/browse/SPARK-3174)). This PR does not provide any functionality by itself; it is a skeleton that is missing a mechanism to be added later in [SPARK-3822](https://issues.apache.org/jira/browse/SPARK-3822).

Comments and feedback are most welcome. For those of you reviewing this in detail, I highly recommend doing it through your favorite IDE instead of through the diff here.
Yeah I think I've seen that in the hadoop code. If I understand correctly, that requires adding the annotation to the original method, not the test method, right? An advantage here is that the original code doesn't need to change in anyway and we can achieve the same. Unfortunately the API exposed here is quite verbose.