When making the grammar popup menu, store the currently selected grammar

Fixes an issue where the status bar could display the wrong grammar

To reproduce:
* Open a file with some set grammar
* Move focus to file browser (option-command-tab)
* Click on grammar popup button
* Dismiss grammar menu

Result:
* First menu item (Apache) is selected and displayed in the status bar