Fix Undo to work correctly

Added an undo stack for label pointer to allow undoing of label command
to work properly. Previously creating a label then undoing it causes the
pointer to still point at the undo-ed label.