Fix the segfault on exit.

The WebEngineContext member was declared after the WebContentsDelegateQt
in WebContentsAdapter. This means that the delegate was destroyed after
the context and would cause the crash.

Reorder the declaration and move the WebContentsDelegateQt also to the
private class to reduce future confusion.

Change-Id: I343504d4fd1ede80feb710446368fdf12f360b15
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Delete the ResourceContextQt on the IO thread.

This mimicks the Shell's behavior to avoid an assert.

Change-Id: I31fdb4ff9c1ee9a359db84978da313489e93e30a
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Once created, keep the WebEngineContext until shutdown.

Chromium isn't expecting the destruction and reconstruction of the
ContentMainRunner and BrowserMainRunner. This will need a few tweaks
before we can do this without hitting asserts in debug builds.

Change-Id: I0c46a2db27350b3f6352e3eb8a5ec7ecff06784e
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>