Utilities: Add new group controller

Added a new class for group controller such that the state is saved
for each iteration with a new group column. The column is set to a
sentinel value if no grouping option is provided.