[SPARK-3930] [SPARK-3933] Support fixed-precision decimal in SQL, and some optimizations

- Adds optional precision and scale to Spark SQL's decimal type, which behave similarly to those in Hive 13 (https://cwiki.apache.org/confluence/download/attachments/27362075/Hive_Decimal_Precision_Scale_Support.pdf)
- Replaces our internal representation of decimals with a Decimal class that can store small values in a mutable Long, saving memory in this situation and letting some operations happen directly on Longs

This is still marked WIP because there are a few TODOs, but I'll remove that tag when done.
Unfortunately I'm not sure where to put this into a rule. This is currently in the execute() method of GenratedAggregate, which only gets created in the Spark query planning stage (SparkStrategies), so rules from the optimizer won't apply here. Is there a place to add further rules after planning?