Chinese state miner to buy Ecuadorean copper project in $1.2bn deal