Reify the squash state/set logic

I'm still looking into the flakey `ChordSpec`, but wanted to get feedback on the most recent commit. The cost/benefit is that the state logic is kept is reduced to a single class. I'm fairly sure that the first commit wasn't quite right either because the window cli test seemed to have an extra num-flip. The big problem is that dump will now be broken for state - it's calling save assuming it's idempotent.
I think we should discuss this in person to make sure we are thinking about the same issue - I have a slightly worried feeling we may be thinking about two different issues with the duplicates.