fixup wml menu items: track the lifetime of the manager

testing revealed that assertions may fail regarding the lifetime
of the manager of wml menu items in some cases. this commit adds
a pointer to each which tracks its manager's life time and prevents
dangling pointers.