Allow non-trivial expressions in `INSERT` statements

These changes really address two issues:
- Early on in planning, the method `refineValueType` was not robust to cast expressions.
- When assigning non-trivial expressions to the partitioning column in an `INSERT` statement, ad hoc planning will mark it as single-partition.  Currently our architecture cannot handle this, so we need to mark these statements as multi-partition.
Thanks for the quick review!