Global action on climate change could generate upward of $340 billion in legal claims from oil and gas in vestors.