Moved plugin download to a dedicated class for cleaner code
Corrected signal disconnection of PluginDownloader and proper closing of the database and its connection
Set singleton instance to NULL when deleted which otherwise causes an error