As China widens its lead as the world's biggest manufacturer, product piracy is growing in sophistication. Illegal copies often come from large plants that also produce the legal product. Western companies are investing more in R&D to counter losses.