When all actions in a submenu are disabled, disable the submenu header
Summary: Fixes T11240. Also simplify things a little and share a bit more code.
- Viewed revisions and tasks, opened submenu.
- Viewed as a user without edit permission, saw the menus greyed out.
Reviewed By: chad
Maniphest Tasks: T11240
Differential Revision: https://secure.phabricator.com/D16201