Royal Dutch Shell has agreed to sell a package of oil and gas fields to private equity-backed Chrysaor for $3.8 billion.