Allow users of ContextualUndoAdapters to forcefully remove any pending item.
(cherry picked from commit e17bb2a)