Challenges posed by climate change could be solved by humans living on other planets, Gary Johnson, the Libertarian presidential candidate has said.