Stabilize tst_qquickimage

Change-Id: Ib2b3d18c583991959d342e8ca36eb10c299b68bf
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
QQuickWindow: fix resetOpenGLState handling of vertex arrays

In the core profile it's forbidden to set vertex attributes
(via glVertexAttribPointer and similar) when there's no VAO bound.
Similarly, if there's a VAO bound when calling resetOpenGLState,
then we need to unbind it or those operations will affect its status.

Change-Id: Id7db028ddde9f9429f5a210b8b3d1468888dbce4
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>