Bug 6360 group by unselected column fix

This fixes a few issues:

Sums for number values weren't being shown in the groups headers.

Grouping was broken since we changed the available group by columns. The way we have structured it means that we can only group by columns if the column data has already been loaded. To fix this I augmented the c[] param to work packages index to include the group by column if it's not in there already so that all the necessary data is returned.