Joint bid of $4.8bn from precious metals groups Pan American and Agnico Eagle trumps South African miner’s offer