The $4.8 billion Minas Conga copper and gold project, which will be the biggest foreign investment in Peru’s history, has run into intense local opposition. The conflict has become a high-stakes test of how Peru treats foreign investment.