Trade Liberalization and Optimal R&D Policies with Process Innovation