Added ability to enable/disable the undo feature

Painting can be slow on big images due to the way the undo feature is implemented. This change lets the user set the availability of the undo feature from 'Initial_undo_feature' in Display.globals, or toggle it from 'm' in the segmenting menu.