mac here, I have same year car , I'm a mechanic and union electrician , and I'll focus on what I've experienced and the most important / most expensive possibility which is transmission - if it's toast you have serious decisions to make , and certainly do not need to spend a hundred$$$ at a time on sequential "possibilities"? Do not try to test drive ,drive too much more I suspect transmission may be very dirty / clogged . This happened to my car - there were black flakes like "black coconut flakes" , a transmission guy at the dealer told me these trans can do this if never done the fliud/filter screen change. I'ts supposed to be a kind of kevlar (he may be off on that) coating in the torque converter , sheds.There will always be pieces in the trans. pan on virtually " any mileage Trans. change" - don't be swayed by a shop / mechanic 's horror story or upselling rebuild . Best if done yourself , with buddy ,best a "mechanic buddy" . The cost of this is about 15% more than a "MAF' , or "IAC" , or "inhibitor switch" - do it now ,today ! (like a TV ad!) MOST important use Dealer fluid & dealer screen , 2nd best ATF is Castrol "for Japanese eforeign cars - Type Dexron III equivelent" - yes this is still available and best formulated to original specs of the Nissan-D fluid. Lastly if this helps,specific to this problem , AND the trans WAS very "dirty" - it's worth it to repeat again (screens on these can be reverse blown out w/ brakleen if fairly new & never very dirty) say next year , say 10-15k mi .
Glen 11/25/2017