Coeur Mining Inc. agreed to acquire New Gold Inc.for about $7 billion in an all-stock deal that consolidates two midsize North American gold producers amid rising investor interest in the sector.