Add some menu generation helpers

Add a couple of helper classes and a method for generating multi-level
menus.