America's No. 2 oil producer is planning to cut its global workforce by up to a fifth as part of a cost-cutting drive.