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