Fixes one cause of #168

`StageGroup`s were keeping the stage configurations in a HashSet, where the hashcode for each configuration was dependent on when it was created. This means a stage could get several configurations in the same stage group. When the set of stages was iterated on, the order was not guaranteed which often meant the old config was applied instead of the new.

The set is now a map using the stage name as key instead.

This should solve part of #168, although I believe there is more going on that causes the unreliable config updates.