y does it have to be something so indepth as a spy or genjutsu lets look at the facts we know
1. if kakashi killed rin obito wouldnt of said he let her die.
2. the genjutsu sounds good in theroy but y would he work with the man who lied to him
3. mandra knows obito is comeing back. (not by will most likely) ill explain in a bit.
so all in all spy, genjutsu has to much explaining behind it to be needed or usefull kakashi and rin where in the woods they got surrounded by the enemy. i would imagian if they where as out numbered as they made it sound the enemy would of had no problem spliting kakashi and rin apart. kakashi starts killing the enemy, smoke everywere. one of the enemy nimnja has the brillent idea "hey i know, ill transform into his comrad and fool him" kakashi sees through this and bam u have the end scene.
now as far as mandra knowing the obito will return is also easy to see. atm hes useing the sprial guys (tobi shell) body to move around. simple enough once the fighting is done and obito wants to go home tobi just says no we r going back closes him up inside of himself and goes back. mandras room becomes resealed, obitos pissed at all sides now but mandra tells him he will train him to make him more powerfull. on top of that with rin dieing it also places a seed of hate for minito (not sure if i spelt that right) nas he to was no were to be found to protect rin. makes the story fall into line a lot more then a spy or genjutsu all in all the dead rin we all saw is a transformation jutsu.