President Donald Trump’s decision on Thursday to leave the Paris Agreement may have saved the federal government from an embarrassing court defeat, because there is a serious constitutional argument that the agreement was unconstitutional unless ratified by the Senate as a treaty.