Guard usage of m_cocoaPlatformWindow.

m_cocoaPlatformWindow is cleared when Qt is "done"
with the QNSWindow or QNSPanel to prevent messages
from Cocoa calling into possibly stale pointers.

Change-Id: Id42b794fedbd3e597a0c4b50584cca976ba74c0f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>