The Past and Future of Life and the Cosmos