Fix some Number <-> String conversion issues in the Preferences handler
New Undo feature: always write out an XML copy of the Undo stack

This will be helpful in a bunch of ways, but especially when
re-implementing AutoSave so that it works with layers.  By checking this
XML header, we can see how many Undo entries were created, what their
types were, and what actions the user initiated.

In the future, I would like to store this data directly inside the PDI
file format.  Hypothetically, we could use it to reconstruct a full
Undo/Redo stack for any image *directly from the file itself* (which
would be totally amazing, because the user would always have access to a
file's full history, even between sessions).