I had an Audi A3 once with that same problem.
Sometimes the revs would climb with a mind of their own to 4500 and just sit there. I looked like a right gimp at traffic lights!
As air conditioning uses fuel, or well let's say some engine power, switching the airco on when it happened often stoped it. So i'd cruise to the light and just have to switch the airco on!
Anyway, in the end it was a problem with the engine management system. A temperature sensor was malfunctioning and was very cheap to replace. If this is your only symptom I doubt it's the whole system. I also doubt it's traction control, can't see that causing this.
My 2000 323ci has a tendancy to take a short delay before the revs drop when I dip the clutch, so might have to put soem money aside as Furious suggests!
Good luck in getting it sorted!