fixed: return CJSONGenerator* from PluginsToJSON() instead of string
fixed: use a while loop in CPluginManager::CheckPlugins() instead of a for loop, since it++ should not be executed when m_plugins.erase(it) is called