Added preserveState option to prevent resetting of menu item states

Every time a menu opens, its items are refreshed with their original
state: items are re-disabled (or enabled), checkbox and radio "checked"
properties are reset, text inputs are emptied. Added a "preserveState"
menu option that skips these resets.
Merge branch 'preserve-item-state'