Fix https://github.com/julianhyde/optiq/issues/281, "EXTRACT function's SQL return type is BIGINT but implemented as Java int".

Extend testing framework to make sure that all expressions' actual type matches their validated type.