If it is anything like the legend says, I can see Melisandre sacrificing herself to bring the sword Light Bringer to life. It was plunged into a heart of fire that the Azor Ahai used to make light bringer.John Snow will be resurrected on his funeral pyre because he is a Targaryen (they do well in flames - see Daenerys) - it will have nothing to do with Mellisandre. He will come out of the fire with his sword in flames and it will be called Lightbringer (as Mellisandre prophesied) to be used to conquer the white walkers. Now that we know Mellisandre is an old hag she could very well be a priestess of the Targaryen's from a long time ago when they were in Valayria. When John rises from the flames she will claim he is Azor Ahai (and not Stannis as she had previously thought).
Who really knows how its going to end I just cant wait for every sunday for the next few months.