Is prayer nullified by having thoughts while performing it?
Prayer isn`t nullified by having thoughts while performing it, provided that the praying person offers all of its pillars and meets all of its conditions. However, the reward decreases significantly in the absence of reverence since a praying person is rewarded according to the attentiveness of his/her heart during prayer.
What is the ruling on the cessation of blood after (40) days from delivery, but later continued sporadically during two days of Ramadan?
Once postpartum bleeding (Nifas) ceases, and the woman is certain that it won`t reoccur, then she becomes ritually pure and so she is free to make Ghusl (purificatory bath), pray, and fast. If the bleeding reoccurs before fifteen days from its cessation, and before the end of (60) days after delivery, then the ruling on postpartum bleeding is effective, and her fasting and prayer are null and void, thus she must make up the fasting that she missed and not the prayer during those particular days.
Is it permissible for a Muslim to escort his deceased disbelieving relative to his final resting place?
It is permissible provided that he doesn`t walk behind non-Islamic symbols, rather he should walk in front of them.
Is it permissible to repeat the Istikhara (seeking guidance) prayer, and is it a condition that one should sleep after offering it?
All perfect praise be to Allah,The Lord of The Worlds Istikhara is offered once, but it is permissible to repeat it, and sleeping after offering it is not a condition for its validity. And Allah Knows Best.