My memory tells me that the coolant sensor on my (1988 4-cylinder Fiero) is mounted horizontally, and sticks out of the thermostat housing so that it points toward the rear of the vehicle. It has a 2-terminal connector on it - one yellow wire, one black wire. The coolant sensor talks to the computer (ECM).
I really am no expert on the 4-cylinder engine. Keeping that in mind, for the idle problem, I might suggest removing the IAC valve, and cleaning it and the associated passages in the throttle body.
That's about all I know. Hope it helps
.