It is not always necessary to create an accelerator group in this way.
The GtkMenu method
ensure_uline_accel_group() calls
the GtkAccelGroup used internally by the menu for
underline accelerators for the duration of the period that the menu is
popped up. If none is designated, a new accelerator group is created
and used.