UndoManager: first batch of code clean-up

Do not translate properties because the class is private.
UndoManager: use g_signal_connect_object()
UndoManager: rename callback functions

The 'cb' suffix is more common than 'handler'.
UndoManager: reorganize the order of the functions

So prototypes are not needed.
UndoManager: use g_object_add_weak_pointer()