Global Production: Firms, Contracts, and Trade Structure (CREI Lectures in Macroeconomics)