Refactor StateChanges into a tree of IStageChange providers - fixes 361

Fixes #361.
Test fails if I don't do that, anyway :grin: