This reverts commit 11bdc321a2.
This change caused T101743, in general OPTYPE_UNDO should not be used
to control the UI.
This also caused 2x undo pushes to be performed when sculpting,
although sculpt mode doesn't add a step for the second undo push
so it wasn't visible to the user.
An alternative fix will be applied separately as it's too risky this
close to a release.