Converts vector to a grouped vector by grouping by devices. I.e. each device has its own list of events.
Groups the events in the given vector by deviceId.
vector
A vector of type Event
A GroupedVector of type <Device,Event>.
Group the events in the GridPowerConsumption vector by device id.