Support for onChangeState event
Added checkEnviornment method to disable plugin init
Added support for checkEnviornment and asyncInit
update plugins to pass callback as second parameter to init function;
Support for checkEnviornment
Added PluginFactory class