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 someone who vowed to fast for two consecutive months, but failed to do so?
He is obliged to fulfill his vow by fasting for two consecutive months, but if he fails to do so then, it remains a debt on him until he either fulfills his vow, or dies. In case of his death, his guardian is supposed to fast on his behalf, or donate food from his estate in return for fasting, but if the guardian fails to do so then, it is all in the Hands of Allah.
Is it permissible for someone who has forgotten to mention the supplication pertaining to answering the call of nature to say it while in the toilet?
It is disliked for a Muslim to mention Allah while in the toilet, but he/she may recall the supplication in his/her head without uttering it; that is in case he/she had forgotten mentioning it before entering the toilet.
Is it permissible for a person who is in a state of Janabah (Ritual impurity) to clip his nails, or to cut his hair?
It is permissible for those in a state of Janabah and menstruation to clip their nails and to shave whatever hair that is permissible to be shaved. And Allah Knows Best.