Safer plugin import
Created by: stefanoborini
First implementation and change of API to make the plugin import system more robust against broken plugins.
This PR requires we readapt all plugins. Similar changes are required also for the other classes API so that it's uniform.