Initial changes for #305 - make state actions undoable. AddState now
seems to be undoable. RemoveState does remove the state and undo that
removal, but it doesn't yet restore the maqDelta values for that state.
Haven't done ModifyState yet.
Finish up getting undo working with state operations. For #305