Trade and the Environment: The Role of Firm Heterogeneity