Are you allowed to daven for a person to die because he is in a lot of pain?
If the person is suffering and there is no cure for their disease, yes it is allowed to pray that God put them out of their misery. There are many stories in the Gemara about rabbis doing just that. (E.g. Bava Metzia 84a.)
Of course even if you're praying that God let them die, you have to do everything you can to make sure the person is getting the food, water, and other care that they need. We don't play God.
The exception I heard from Rabbi Hershel Shachter (quoting someone earlier, I don't remember who) is your spouse: even if s/he is very sick and suffering tremendously, it's not proper for you to pray that s/he dies.
Yes. See Igros Moshe Choshen Mishpat 2:73(a) where R. Moshe quotes Kesuvos 104a (the story of Rebbe's handmaid praying that Rebbe, who was suffering, should die) in support of the conclusion that in some cases we ought to pray that suffering people should die. He also explains there under what circumstances we can refrain from continuing to actively extend the life of someone who is suffering.