Rambam Hilchos Rotzeach 2:10-11 with Kessef Mishnah explains that it is forbidden to kill a Gentile. The penalty for killing a Gentile is "death by the hands of heaven". The Ra'avan in his commentary to Bava Kamma 74d also explains that "Thou shalt not murder" in the Ten Commandments applies to any person, including gentiles. (as well as not to steal or commit adultery)
The Rambam Hilchos Yesodei HaTorah 5:7 brings the Gemara's ruling (Pesachim 25b etc.) as Law and explains in a case where someone threatens Reuven and says kill Shimon or I will kill you!; a person must rather be killed than to murder someone else. The reason is "who says your blood is redder?" or why should one life be chosen over the other?
The Kessef Mishnah explains that even in a case where you could actually prove that someone's blood is in fact redder than the other person's, (the other fellow's life is more important) we still do not commit murder to save ourselves. The Jewish people have a tradition that we do not do so under any and all circumstances. The logical reason given by the Gemara, usually applies. But, even if it doesn't,the Law remains the same.
Now the Rambam, and Rashi, seem to frame the case by example, regarding two Jews. However, if we go with the Kessef Mishnah's tradition, then Rambam and Rashi are simply stating the case to match the Gemara's logic (weighing two potentially equal lives on a scale). However, the Kessef Mishnah's tradition teaches that the logic need not apply. As long as its a question of murdering someone to save oneself, we forbid it. So why would we weigh the difference in who to save based on Jew or Gentile (even if one has more commandments than the other etc.)? Besides, what would be the point of killing someone else to save your life, when the penalty is death? You didn't save your own life at all if it is condemned to be punished by death?!
Finally, IMHO, the greatest Kiddush Hashem is for a person to withstand any urge (even self preservation) and show the world that a Jew, Hashem's representative, would never commit murder! This sacrifice is the better path because we must make sure human life is precious in the eyes of the world.
I hope this helps, :-)