If it runs fine with the IAC unplugged there is too much air entering the engine. It should stumble along at VERY low rpms if it runs at all. The extra air can be from a throttle body open too far, a vacuum leak, or a PCV system hooked up wrong.
The hanging idle is caused by the dashpot function in the PCM software. It is used to keep the engine from stalling on decel. It should hold idle speed just a tad higher for a couple of seconds when you let off the throttle. Like a dashpot on a carb would.
I'm going to use random numbers for this explanation, only to keep math easy because I'm tired and have a headache.
The PCM is programmed to run at 1 lb per minute at idle speed.
Without the IAC working, .5 lbs per minute flow through the throttle body and PCV valve. This value is also programmed in to the PCM.
The PCM knows that it has to command another .5 lbs per minute through the IAC valve to maintain idle speed at our 1 lb/min.
The PCM knows it takes a ducty cycle of 30% to add that .5 lbs/minute.
The PCM is also programmed to add .25 lbs/min during decel for dashpot.
The PCM knows it takes another 15% Duty cycle for the .25 lbs/min for dashpot.
So, because of how it's programmed, on decel the PCM will command 45% ducty cycle for dashpot for a few seconds (1.25 lbs/ min) , and then drop to 30% for idle (1 lbs/min).
Now, this works with absolute perfection if you actually have .5 lbs/min entering the engine without the IAC valve helping.
However, if the engine runs at idle speed with no help from the IAC then it's pretty safe to say that the engine is getting at least 1 lb/min without the IAC instead of the .5 lbs/min it's programmed for.
So now when we decel and enter dashpot mode our 45% duty cycle that is commanded is giving us 1.75 lbs/min instead of 1.25 lbs/min. That is where the crazy high idle speed hang comes from (almost double the amount of air as what it takes to idle). Correct the extra air and you solve the idle hang.