Swap out application menus on focus

Now that package menus properly destroy themselves during deactivation, the window's application menu should be tracked and restored when the window gains focus.

Fixes #3806