Is it permissible for one to masturbate in order not to commit fornication?
This is called committing the milder of the two evils such as eating a carcass in fear of death, and this happens when committing fornication is very likely to occur.
Is it allowed for a Muslim woman to wear nail polish?
Praise be to Allah the Lord of the Worlds. May His peace and blessings be upon our Prophet Mohammad and upon all his family and companions.
Nail polish is an adornment that a woman is allowed to wear for her husband, and not in the presence of non-Mahram men. However, during ablution water needs to reach the nails, so it isn`t possible to perform 'Wudu (ablution) with nail polish on. Therefore, it isn`t valid to make Ghusl Jnabah (Ghusl performed after sexual intercourse or ejaculation), Ghusl after menstruation and Ghusl after Nifas (blood of childbirth) while wearing nail polish. And Allah The Almighty Knows Best.
What is the ruling on praying behind an undesirable Imam?
It is permissible to pray behind an Imam who is undesirable for committing religious violations, and it is disliked for such an Imam to lead the prayer. Still, If he was undesirable for a personal, or a worldly matter, then such argument doesn’t hold water. And Allah Knows Best.
Is it permissible to swear by (Allah "The Living")?
Yes, it is permissible because "The Living" is one of Allah`s Attributes.