That is the switch from your thumb throttle. It is used like this: If its connects, and the TORS switches in the carbs DO NOT the ignition is chopped. You have to either unplug the entire TORS unit located on the left had side under your gas tank, or cut the switch off the end of that and twist the wires together.
I would think your idling uncontrollably is an air leak.
Somehow air is getting in to the carbs, and running lean, thus the runaway condition though a super hot plug (from running lean from the air leak) or carbon deposits. Pull a plug and take a look at it.