Canadian National Railway Co. nearly doubled earnings and revenues in its second quarter as the company…