Start over on imageChanged:[layers:]changed and when adjustment layers are involved

Supercedes #136.
Fixes #87.
Fixes #88 and #99 in an inefficient way (resets the whole document instead of just the layer - I don't want to risk anything by trying a more fine-grained approach at this stage).
Also fixes #29.