Save the existent GLContext when the widget is painted

If the QWebPage is added to a QGraphicsScene without a QGraphicsView and a
GLViewport, it's not able to get the GLContext from the latter.
Moving the code to save the GLContext to the paint method ensures that the
QGraphicsView is properly set and the GLContext can be retrieved.