fixed singleton exposition to QML

Exposed interfaces are now available at component creation
Cache is now cleared when a plugin could not be imported due to errors.
Added a type-check helper for singleton
Cleaner way to expose Singleton to QML
Refactored plug-in initialization