You have asked hypothetical questions. I will attempt to answer what has been discussed by our `ulama.
1. In the light of the Islamic belief of the end of this world and the death of all living beings, the question of human beings surviving the disintergration of the earth does not arise at all.
2. It is true that the Qur'an talks about "praying/worship" by non-human creatures. However, as far as the concept of "worship -- ibadat" by other beings is concerned, their "worship" is not same as that done by human beings. "Ibadat" is more broader in meaning than the term "salat/namaz". "Ibadat" means the act of submission to the Almighty whereas "salat" means the ritual prayers done by Muslims. It is in salat that one has to face towards the direction of the Mecca as required by the specific order of the Qur'an (2:144). But for other prayers (du`as) you can face any direction you want. Wherever you turn, you will find Allah in that direction.
3. Our mujtahidin have also discussed the issue of qiblah for those who travel in space-crafts or visit other planets (e.g. the Moon). They say that when you are on the earth, your qiblah for salat is Mecca; but when you are in the space, your qiblah for salat is the planet earth.