Refactor StateChanges into a tree of IStageChange providers - fixes 361

Fixes #361.
This took a little while to understand. Maybe a few comments are in order or clearer variable names.
 * run
 * immediately sets deployer on the first change
 * second change is not run (deployer == NOT_CALLED)
 * first change deferred is fired
 * second change is `run` with supplied deployer.
 * second_change.deployer == supplied deployer