Does passing wind from the anus affect ritual purity?
Ablution is nullified by the passing of wind from the anus, but washing the anus is not required as wind leaves no impurity.
What is the ruling on a Muslim who slaughters an animal while being in a state of Janabah (ritual impurity)?
All Perfect Praise be to Allah, The Lord of The Worlds, and may His Peace and Blessings be upon our Prophet Muhammad and upo all of his family and companions.
Slaughtering is permissible for the ritually impure man and the menstruating woman because ritual purity isn`t a condition for the validity of the slaughtering. Moreover, it is permissible for the uncircumcised person to do the slaughtering as well. And Allah The Almighy Knows Best.
How is night prayer offered?
Night prayer is offering voluntary prayer after Maghrib and before Fajr (Dawn). As for Tahajjud, it is offering voluntary prayer at night after waking up voluntarily, and for Allah`s sake as He Says (What means): "And pray in the small watches of the morning: (it would be) an additional prayer (or spiritual profit) for thee: soon will thy Lord raise thee to a Station of Praise and Glory!" [Al-Isra`/79]. Offering Tahajjud is better than offering voluntary prayer before going to bed.
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.