[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 
result --> Result.

Also I think it would be helpful to mention the config parameter name and the current setting here to aid with debuggability; e.g.,:

"Finished $taskName (TID $taskID), but dropping result because the size ($resultSize bytes) is larger than the maximum result size ($maxResultSize).  Increase spark.driver.maxResultSize to allow larger task results."

This is a longer message, but in general I think this makes it much easier for a user than if they have to google the error and track down the config option they may want to change.