Dynamics of Firms and Trade in General Equilibrium