[SPARK-33297][BUILD] Switch to use flat class loader strategy in SBT
[SPARK-33297][BUILD] Switch to use flat class loader strategy in SBT

### What changes were proposed in this pull request?

This PR proposes to switch the class loader strategy from `ScalaLibrary` to `Flat` (see https://www.scala-sbt.org/1.x/docs/In-Process-Classloaders.html):

https://github.com/apache/spark/runs/1314691686

```
Error:  java.util.MissingResourceException: Can't find bundle for base name org.scalactic.ScalacticBundle, locale en
Error:  	at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1581)
Error:  	at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1396)
Error:  	at java.util.ResourceBundle.getBundle(ResourceBundle.java:782)
Error:  	at org.scalactic.Resources$.resourceBundle$lzycompute(Resources.scala:8)
Error:  	at org.scalactic.Resources$.resourceBundle(Resources.scala:8)
Error:  	at org.scalactic.Resources$.pleaseDefineScalacticFillFilePathnameEnvVar(Resources.scala:256)
Error:  	at org.scalactic.source.PositionMacro$PositionMacroImpl.apply(PositionMacro.scala:65)
Error:  	at org.scalactic.source.PositionMacro$.genPosition(PositionMacro.scala:85)
Error:  	at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)
Error:  	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Error:  	at java.lang.reflect.Method.invoke(Method.java:498)
```

See also https://github.com/sbt/sbt/issues/5736

### Why are the changes needed?

To make the build unflaky.

### Does this PR introduce _any_ user-facing change?

No, dev-only.

### How was this patch tested?

GitHub Actions build in this test.

Closes #30198 from HyukjinKwon/SPARK-33297.

Authored-by: HyukjinKwon <2680965ad5aae29275c8fb10150cb10f5554e78b@apache.org>
Signed-off-by: HyukjinKwon <2680965ad5aae29275c8fb10150cb10f5554e78b@apache.org>

cloud-fan/spark,witgo/spark,apache/spark,taroplus/spark,shaneknapp/spark,wangmiao1981/spark,srowen/spark,JoshRosen/spark,wangmiao1981/spark,nchammas/spark,milliman/spark,dongjoon-hyun/spark,zero323/spark,zzcclp/spark,maropu/spark,dongjoon-hyun/spark,jiangxb1987/spark,vinodkc/spark,zero323/spark,srowen/spark,hvanhovell/spark,zzcclp/spark,holdenk/spark,HyukjinKwon/spark,chuckchen/spark,milliman/spark,ueshin/apache-spark,apache/spark,hvanhovell/spark,mahak/spark,witgo/spark,BryanCutler/spark,wangyum/spark,maropu/spark,BryanCutler/spark,jiangxb1987/spark,HyukjinKwon/spark,chuckchen/spark,WeichenXu123/spark,ueshin/apache-spark,JoshRosen/spark,chuckchen/spark,cloud-fan/spark,maropu/spark,cloud-fan/spark,vinodkc/spark,jiangxb1987/spark,BryanCutler/spark,WeichenXu123/spark,apache/spark,taroplus/spark,vinodkc/spark,mahak/spark,WeichenXu123/spark,shuangshuangwang/spark,mahak/spark,zero323/spark,nchammas/spark,vinodkc/spark,ueshin/apache-spark,ueshin/apache-spark,rednaxelafx/apache-spark,holdenk/spark,shaneknapp/spark,apache/spark,wangyum/spark,rednaxelafx/apache-spark,zero323/spark,xuanyuanking/spark,holdenk/spark,BryanCutler/spark,gengliangwang/spark,srowen/spark,gengliangwang/spark,dongjoon-hyun/spark,milliman/spark,witgo/spark,wangmiao1981/spark,chuckchen/spark,shuangshuangwang/spark,shuangshuangwang/spark,wangyum/spark,xuanyuanking/spark,HyukjinKwon/spark,hvanhovell/spark,WeichenXu123/spark,vinodkc/spark,JoshRosen/spark,srowen/spark,gengliangwang/spark,zzcclp/spark,zero323/spark,shaneknapp/spark,mahak/spark,gengliangwang/spark,dongjoon-hyun/spark,rednaxelafx/apache-spark,rednaxelafx/apache-spark,chuckchen/spark,WeichenXu123/spark,rednaxelafx/apache-spark,wangyum/spark,JoshRosen/spark,chuckchen/spark,mahak/spark,holdenk/spark,shuangshuangwang/spark,taroplus/spark,zzcclp/spark,wangyum/spark,apache/spark,zzcclp/spark,taroplus/spark,xuanyuanking/spark,witgo/spark,shuangshuangwang/spark,nchammas/spark,jiangxb1987/spark,jiangxb1987/spark,ueshin/apache-spark,witgo/spark,jiangxb1987/spark,zzcclp/spark,HyukjinKwon/spark,wangmiao1981/spark,shuangshuangwang/spark,xuanyuanking/spark,milliman/spark,witgo/spark,hvanhovell/spark,HyukjinKwon/spark,hvanhovell/spark,witgo/spark,taroplus/spark,BryanCutler/spark,vinodkc/spark,HyukjinKwon/spark,shaneknapp/spark,holdenk/spark,nchammas/spark,apache/spark,xuanyuanking/spark,dongjoon-hyun/spark,zzcclp/spark,rednaxelafx/apache-spark,shuangshuangwang/spark,maropu/spark,cloud-fan/spark,BryanCutler/spark,WeichenXu123/spark,shaneknapp/spark,mahak/spark,zero323/spark,JoshRosen/spark,nchammas/spark,milliman/spark,shaneknapp/spark,rednaxelafx/apache-spark,WeichenXu123/spark,gengliangwang/spark,milliman/spark,nchammas/spark,dongjoon-hyun/spark,ueshin/apache-spark,shaneknapp/spark,zero323/spark,holdenk/spark,HyukjinKwon/spark,cloud-fan/spark,wangmiao1981/spark,JoshRosen/spark,milliman/spark,xuanyuanking/spark,jiangxb1987/spark,wangmiao1981/spark,wangmiao1981/spark,hvanhovell/spark,xuanyuanking/spark,cloud-fan/spark,hvanhovell/spark,gengliangwang/spark,JoshRosen/spark,wangyum/spark,wangyum/spark,taroplus/spark,nchammas/spark,holdenk/spark,maropu/spark,vinodkc/spark,maropu/spark,mahak/spark,srowen/spark,gengliangwang/spark,taroplus/spark,srowen/spark,BryanCutler/spark,chuckchen/spark,dongjoon-hyun/spark,cloud-fan/spark,apache/spark,ueshin/apache-spark,srowen/spark,maropu/spark