[SPARK-3594] [PySpark] [SQL] take more rows to infer schema or sampling

This patch will try to infer schema for RDD which has empty value (None, [], {}) in the first row. It will try first 100 rows and merge the types into schema, also merge fields of StructType together. If there is still NullType in schema, then it will show an warning, tell user to try with sampling.

If sampling is presented, it will infer schema from all the rows after sampling.

Also, add samplingRatio for jsonFile() and jsonRDD()
When `samplingRatio` is specified, the schema is inferred by looking at the types of each row in the sampled dataset.  Otherwise, the first 100 rows of the RDD are inspected. Nested collections are supported, which can include array, dict, list, Row, tuple, namedtuple, or object.

Each row could be L{pyspark.sql.Row} object or namedtuple or objects.  Using top level dicts is deprecated, as this datatype is used to represent Maps.
 
If a single column has multiple distinct inferred types, it may cause runtime exceptions.