First cut on undo of sort by row.

Change-Id: I2637c9e353796005a94a8ea77283264556edf3d8
More tweaking.

Change-Id: Icc7d7ad5f6f418766b8688eef6b180ecfa9b57b3
Implement the redo.

Change-Id: I2476f7415a5b91eef49a5da1ed3244d25679b60b
Cleanup.

Change-Id: I0da0f83778961b7f933f3b77a1337497072eea50