A dramatic last-minute switch has salvaged Glencore’s merger with global miner Xstrata for the moment, but the international commodities trader still has many hurdles to overcome. Clara Ferreira-Marques and Emma Farge report