[SPARK-3713][SQL] Uses JSON to serialize DataType objects

This PR uses JSON instead of `toString` to serialize `DataType`s. The latter is not only hard to parse but also flaky in many cases.

Since we already write schema information to Parquet metadata in the old style, we have to reserve the old `DataType` parser and ensure downward compatibility. The old parser is now renamed to `CaseClassStringParser` and moved into `object DataType`.

@JoshRosen @davis Please help review PySpark related changes, thanks!
you can setup path in bashrc:
```
export SPARK_HOME=path_to_spark
export PYTHONPATH=${SPARK_HOME}/python/:${SPARK_HOME}/python/lib/py4j-0.8.2.1-src.zip
```
then you could run any pyspark jobs directly with python (or run single test)
```
python python/pyspark/sql.py
```