UndoManager: simplify use of g_queue_insert_before()

Requires a recent GLib.