fdo#75977: Write test for this.

Change-Id: I96bd008759a2a06ffeea46f2b25b847bc895e9eb
fdo#75977: Clear sheet deleted flags for affected references when undoing.

This will allow formula cells to restore deleted references when they get
recalculated.  With this change, SetDirty() that previosly took no argument
has been renamed to SetAllFormulasDirty(), and it now takes one argument that
stores context information.

Change-Id: If0de5dc1737a2722b6d61a87644b10a4f921edc5