[SPARK-3007][SQL]Add "Dynamic Partition" support to Spark Sql hive

a new PR base on new master.  changes are the same as https://github.com/apache/spark/pull/1919
Actual writers are created on the fly by `writeToFile` on driver side, but the `writerMap` object is on driver side, so it's always empty, and `commitJob()` never gets called.

Had an offline discussion with @yhuai, and came to the conclusion that, instead of creating a bunch of `SparkHiveHadoopWriter`s on executor side, we can create multiple `FileSinkOperator.RecordWriter`s on executor side within a single driver side `SparkHiveHadoopWriter`, so that we can call `commitJob` properly. This behavior somewhat mimics Hive `DynamicPartitionFileRecordWriterContainer`.