fix issue when grouping by primary key(s) or routing column

* the required granularity for projections wasn't serialized
* the projectors executed on every shard weren't initialized properly
RowGranularity has fromStream / toStream