Fix QtQuick2 module unload support

This commit ensures that the value type providers installed by the
QtQuick2 QML module during initialization are uninstalled when the
plugin is unloaded.

It also fixes a bug in the type compiler so that it now works with
types from plugins which get unloaded and then reloaded.

Task-number: QTBUG-43004
Change-Id: I4b3fb75aae65dfbc5de9c88701ed82514087ab7d
Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>