Fix freeing issue in RCore plugins and rename RCmdPlugin to RCorePlugin