Months of wrangling over chipmaker sees deal with China-owned company thwarted on national security grounds