Hmm, the idle going up and down when coming to a stop could be a few things. The AAC valve may be all gunked up if it's never been cleaned. It's supposed to increase idle speed when you're using accesories like air conditioning, or turning the wheel using power steering.
A vacuum leak could also cause unstable idle once warmed up. Check all your vacuum lines, as well as the intake pipe leading to the turbo. If the intake pipe is split, that's a huge vacuum leak. If have the stock intercooler still, it may be leaking from damage, which is what happened to mine, it was all bent and damaged, which cause lots of air to escape.
You might have a dirty MAF too, which can be cleaned with an MAF cleaning product. Honestly though, if the MAF is original, I'd replace it with either a used one known to be in good condition, or upgrade to a 300zx MAF, which will require an ecu retune, but allows for more power to be made down the road. The MAF connection could also be to blame. Try cleaning the contacts with electrical contact cleaner, or resoldering the wires inside the MAF.
Aside from those things, I'm not really sure about what could cause the rpm's to bounce up and down a lot. You could try increasing the idle speed a little bit to see if it settles the rpms. My rpm's used to go up and down a little bit, which stopped when I increased idle speed up to 900rpm.