More QQuickCanvas cleanup handling.

Avoid calling into QQuickContext2D from QQuickContext2DTexture
after QQuickContext2D has been deleted. We acheive this by

1. Giving the texture a direct pointer to the gl context and
   and surface, so that it doesn't need to go through m_context
   to get to them (which may have been deleted).

2. Protect access to QQuickContext2DTexture::m_context with
   a mutex and make sure it is set to 0 in a safe manner
   when the QQuickContext2D object is deleted.

Change-Id: Ie0a30f9fc46f844224838a7cdf2f28a62e8ce322
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Support Canvas.antialiasing without multisample support.

FBO based rendering relies on framebuffer multisampling to do
antialiasing, which is often not available on OpenGL ES and even on
some desktop chips. As a high-level API, it is quite bad that Canvas
users (on embedded in particular) have to choose between quality
(Image) or performance (FBO).

This change implements super sampling, rendering the content
at twice the size and then scaling it down.

[ChangeLog][QtQuick][Canvas] Implement antialiasing on
FramebufferObject based render targets through super-sampling (SSAA)
when framebuffer multisampling is not available.

Change-Id: I373f3a645342dac157506b746c1e39b0f3f3f9f2
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Handle scene graph invalidation

Change-Id: Icff592a4ae48444a36406a65c1c04a3a6da77616