Car wont run now!
But to answer your question, I've NEVER heard of a tune being erased by leaving a battery disconnected. And in attempt to shed some light on your situation, I had the exact same thing happen to me, regarding your idle condition. The back cylinder on the passenger side (Gen I & II it would be #8, can't remember the Gen III), I had a helluva time getting the wire to snap onto the coil. I thought I had it. Got everything bolted back up, and it barely wanted to idle or even rev. I put it in gear to pull it forward into the garage a little more, and it died out. I knew it was that wire. Un-bolted the EGR tube off again, 20 minutes of fighting and scratches on my forearm, and I got it to snap in place. Good to go.
Just sayin'....
Disconnecting power for a while does, however, clear out the Long Term Fuel Trim data which can make poorly-tuned engines run badly until they're warmed up and running in Closed Loop again.

