UndoManager provides a mechanism for automatically rolling back on
exceptions. An additional benefit of this approach is that undo code is
spatially close to the roll-forward code.
This patch should be considered an intermediate step towards a more
complete Command pattern based approach down the road.
Change-Id: Ib429420d67324422a5d13cdea6872fd9c57c857e