This will make the menuitems pick up matching accel map entries automatically. Currently, nothing creates such accel map entries, though.
Put this in a separate file and substantially refactor it. Move handling of submenu creation into gtkmodelmenuitem where it belongs. Improve our handling of when to show separators or not.