The double role of GDP in shaping the structure of the international trade network