Refactor StateChanges into a tree of IStageChange providers - fixes 361

Fixes #361.
Yes, that'll be up for review as soon as I merge this branch.