[SPARK-4358][SQL] Let BigDecimal do checking type compatibility and use more specified numeric types 

Remove hardcoding max and min values for types. Let BigDecimal do checking type compatibility.
The runtime type checking here is not good. Thanks for your suggestion, I add the casting for `GetItem` and `Substring` in `FunctionArgumentConversion`.

For the `resolved ` problem, since it is supported to use non `IntegerType` as `ordinal` (ref: test `apply schema` in `SQLQuerySuite`, to add this condition to `resolved` would case error. So I leave it as unmodified.