For decades, America lost factories and jobs to China but retained a coveted title: the world’s leader in inventing and commercializing new products. Now, even that status has been eroded, and it’s hurting the economy. While the United States is still at the top in total investment in research and development — spending $500 billion in 2015 — a new …