Implement better resolution of window aggregate return types

Fixes https://issues.apache.org/jira/browse/OPTIQ-292

It looks like the update of `SqlOverOperator.deriveType` is sufficient so window aggregates derive proper return types.

Side fixes:
1) `LAST_VALUE` return type was 0 for empty set (as in https://issues.apache.org/jira/browse/OPTIQ-232)
2) Updated `SUM0` placement:  was `case when count(*)>0 then sum0(.) else null end`, I've altered to `case when count(*)>0 then cast(sum0(.) as nullable) else null end`. I believe that is semantically correct, however it stands in the way of performance optimizations. It results in `toLong(current[4]) > 0L ? Float.valueOf(SqlFunctions.toFloat(current[5])) : (Float) null` while valueOf/toFloat pair is not easy to debunk.
3) I've removed cohorts from `WindowedAggSplitterRule` since I do not understand why it is required and with cohorts the nested window aggregates do not work (see start_of_group tests in `JdbcTest`)