Essays on firm dynamics and international trade