[SPARK-3466] Limit size of results that a driver collects for each action

Right now, operations like collect() and take() can crash the driver with an OOM if they bring back too many data.

This PR will introduce spark.driver.maxResultSize, after setting it, the driver will abort a job if its result is bigger than it.

By default, it's 1g (for backward compatibility for most the cases).

In local mode, the driver and executor share the same JVM, the default setting can not protect JVM from OOM.

cc @mateiz 
At first, I tried the way you suggested, introduced another kind of failure, then we need to do special things for it, because we won't retry this task in some way. 

If size of single task is not bigger than maxResultSize, all the tasks are successful, but we still abort the job. So I think it's better to do similar things for single large task.

So I think the current approach is better than introducing another type of failure.