Once there was life on Mars - but scientists believe a series of devastating mass extinctions transformed a watery planet into a desert.