Human capital formation and the linkage between trade and poverty: the cases of Costa Rica and Nicaragua