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

When making the grammar popup menu, we would set the selected grammar
in the menu based on the document file type. This required that OakDocumentView
had focus. But, in cases where it did not have focus (file browser or html output),
we would select the wrong grammar in the popup menu.

So now we just store the current selected grammar and reset it
after we finish reconstructing the popup.