Add support for submenus in the automation menu

Split the menu text on /, with each segment before the last used as the
submenu name and the last as the actual menu text.

Closes #852.