[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.
I'm not sure that runtime type checking is really the best way to handle this.  It adds a reflective cost to each invocation and it means when we add numeric types we need to revisit this code.  Also, what about long?

Instead, if we want to support using bytes/shorts/etc as ordinals I think we should instead add a rule to analysis (probably in `FunctionArgumentConversion`) that adds a cast as needed.

Existing problem: `resolved` should not be true unless `ordinal` is of type `IntegerType`