Make the "undo_function" bit optional.

The "undo_function" part of callbacks was required, even though it
might not be required for functionality... Make it optional, so we
don't end up making/using no-op functions to avoid doing anything.