Use K_PLUGIN_FACTORY_WITH_JSON macro for plugins

Authored by somsubhrabairi.