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.
There used to be a way on github to comment on the pull request over all rather than a specific line. I don't know why they keep retiring useful features.
Anyway, this changeset looks good to go.