Support arbitrary HTML attributes on menu items

This lets extensions add whatever hooks they need to enhance menu items.
Merge branch '4.2/arbitrary-menu-attributes'