Fix crash on QQmlEngine destruction.

QQmlTypeLoader references QQmlImportDatabase in a thread, so change the
declaration order so QQmlTypeLoader is destroyed and its thread stopped
before QQmlImportDatabase is destroyed.

Change-Id: Idfa511cf9625f893c4398f419a74d869169b478d
Merge pull request #28 from adenexter/incubation-crash

Fix crash on QQmlEngine destruction.