Make menus only as wide as they need to be. Fixes #853

This stops menus from being annoyingly wide by calculating the menu width to be
max_item_text_width + max_hotkey_text_width + padding
Where padding is the minimum separation between item and hotkey text. This is
currently fixed at 12 units.
Merge pull request #1438 from jtanx/menu-width

Make menus only as wide as they need to be. Fixes #853