Foreign Investment and Domestic Productivity: Identifying Knowledge Spillovers and Competition Effects