I had a similar problem where my car would suddenly lose revs at idle and come close to stalling. Throwing a CEL in the process. Coilpack replacement seems to have addressed the issue for me.
[From Chiltons]
To check your coil pack using a multimeter:
i) Remove the connector and check the resistance between pin 4 (the pin closests to the drivers side) and each of the other 3 pins. Resistance should be between 0.3 and 1.0 Ohms.
ii) Check secondary resistance. Measure the resistance between each of the coil pairs: 1|5, 2|6, and 3|4. Secondary resistance should fall between 12.8 and 13.1 kilo-ohms.
Good luck!