Migration, FDI and the margins of trade