Viewport: handle the situation when Scenegraph is already initialized.

Presently, Viewport waits for the QQuickWindow::sceneGraphInitialized()
signal to initialize, which only fires once on application start.
Viewports constructed later miss the signal and thus do not initialize.
So we first check if QQuickWindow::openglContext() is not NULL, which
indicates that the Scenegraph is ready, and initialize right away.

Change-Id: Ib83479621ad8911896d1792aa807d39a517c1a49
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>