Fix crash at shutdown.

The context pointer was dereferenced after the context object was deleted. This is fixed by storing a pointer to the MainWindow in QTFullScreen, so context does not have to be dereferenced.

The logic in QTFullScreen::eventFilter is also simplified a bit.
Merge pull request #840 from ibooij/fix_crash_in_qtfullscreen

Fix crash at shutdown.