New York and Massachusetts alleged the oil giant concealed the dangers of climate change and lied to the public and investors.