Merge of Luc's changes for MONDRIAN-1130 from master.  Original commit message:  "Instead of doing a bunch of idiotic checks with instanceof, I've rewritten the in-memory rollup to use directly the datatype provided by the measure. This will rpevent any class cast exceptions due to the presence (or not) of nulls."
https://github.com/pentaho/mondrian/commit/6ad920a317277855771d1a4dd0801d1d9f6ea6d4