[SPARK-3891][SQL] Add array support to percentile, percentile_approx and constant inspectors support

Supported passing array to percentile and percentile_approx UDAFs
To support percentile_approx,  constant inspectors are supported for GenericUDAF
Constant folding support added to CreateArray expression
Avoided constant udf expression re-evaluation

Author: Venkata Ramana G <ramana.gollamudihuawei.com>

Author: Venkata Ramana Gollamudi <ramana.gollamudi@huawei.com>

Closes #2802 from gvramana/percentile_array_support and squashes the following commits:

a0182e5 [Venkata Ramana Gollamudi] fixed review comment
a18f917 [Venkata Ramana Gollamudi] avoid constant udf expression re-evaluation - fixes failure due to return iterator and value type mismatch
c46db0f [Venkata Ramana Gollamudi] Removed TestHive reset
4d39105 [Venkata Ramana Gollamudi] Unified inspector creation, style check fixes
f37fd69 [Venkata Ramana Gollamudi] Fixed review comments
47f6365 [Venkata Ramana Gollamudi] fixed test
cb7c61e [Venkata Ramana Gollamudi] Supported ConstantInspector for UDAF Fixed HiveUdaf wrap object issue.
7f94aff [Venkata Ramana Gollamudi] Added foldable support to CreateArray
MAINTENANCE: Automated closing of pull requests.

This commit exists to close the following pull requests on Github:

Closes #3137 (close requested by 'marmbrus')
Closes #3362 (close requested by 'marmbrus')
Closes #2979 (close requested by 'JoshRosen')
Closes #2223 (close requested by 'JoshRosen')
Closes #2998 (close requested by 'marmbrus')
Closes #3202 (close requested by 'marmbrus')
Closes #3079 (close requested by 'marmbrus')
Closes #3210 (close requested by 'marmbrus')
Closes #2764 (close requested by 'marmbrus')
Closes #3618 (close requested by 'marmbrus')
Closes #3501 (close requested by 'marmbrus')
Closes #2768 (close requested by 'marmbrus')
Closes #3381 (close requested by 'marmbrus')
Closes #3510 (close requested by 'marmbrus')
Closes #3703 (close requested by 'marmbrus')
Closes #2543 (close requested by 'marmbrus')
Closes #2876 (close requested by 'marmbrus')
Closes #1281 (close requested by 'JoshRosen')